[Pythonmac-SIG] Mac OS 10.3.5 and tkinter.

Robert Kern rkern at ucsd.edu
Fri Nov 26 23:16:14 CET 2004


Paul Taka wrote:
> 
> Oh, I forgot...
> If I keep #!/usr/bin/python instead of pythonw, it seems to work (almost)
> I get "SetFrontProcess failed,-606" error each time I click on my TK 
> window.
> 
> I thought pythonw would fix the problem, but the script doesn't launch 
> and just say
> 
> from: can't read /var/mail/Tkinter
> ./hello.py: line 21: syntax error near unexpected token `('
> ./hello.py: line 21: `fen1=Tk()'

/usr/bin/pythonw is a shell script, so it can't be directly called by 
the #! (it will try to interpret hello.py as a shell script, too, not a 
Python script; thus the syntax errors).

Use

#!/usr/bin/env /usr/bin/pythonw

-- 
Robert Kern
rkern at ucsd.edu

"In the fields of hell where the grass grows high
  Are the graves of dreams allowed to die."
   -- Richard Harter


More information about the Pythonmac-SIG mailing list