I was trying to go through the tutorial for Tkinter at Pythonware
The hello world example gave me the following, strange errormessage:
[SOLUTION]from: can't read /var/mail/Tkinter
./ex1.py: line 5: syntax error near unexpected token `('
./ex1.py: line 5: `root = Tk()'
The reason for the error is that the examples don't start with the linux typical "shebang!" - e.g. "#!/usr/bin/python", but with "# file: xxx".
Change the first line to the correct shebang for your environment and everything's fine.
Examples:
"#!/usr/bin/python" for Debian based distros (e.g. Ubuntu)
"#!/usr/bin/env python" to be less path dependent