[Pythonmac-SIG] strange #!/usr/bin/pythonw behavior...
skip at pobox.com
skip at pobox.com
Fri Feb 10 15:59:57 CET 2006
>>> #!/usr/bin/pythonw
Bob> Sounds like you're using OS X 10.3. It shipped with pythonw as a
Bob> shell script, not an executable.
skip> Yes, thanks. Shoulda thought to actually look at
skip> /usr/bin/pythonw...
Alas, explicitly specifying the long path didn't work either. It bombs on
import of appscript:
Traceback (most recent call last):
File "/Users/skip/cmd/ical.py", line 11, in ?
from appscript import *
File "/Library/Python/2.3/appscript/__init__.py", line 16, in ?
from specifier import app, CommandError
File "/Library/Python/2.3/appscript/specifier.py", line 9, in ?
import aem
File "/Library/Python/2.3/aem/__init__.py", line 25, in ?
from send import *
File "/Library/Python/2.3/aem/send/__init__.py", line 103, in ?
raise RuntimeError, "Can't send Apple events: no access to Window
Manager. (aem-based scripts must be run within a GUI process; e.g. use
'pythonw', not 'python', if running script in shell)"
RuntimeError: Can't send Apple events: no access to Window
Manager. (aem-based scripts must be run within a GUI process; e.g. use
'pythonw', not 'python', if running script in shell)
even when run from a Terminal window.
Skip
More information about the Pythonmac-SIG
mailing list