I was playing with appscript and created a script and
everything worked just
fine when I ran it from within BBEdit. Then I moved it to
its proper place
and tried to use it from the command line, didn't work, it
didn't understand
the "import" command (unknown command).
I started to cut down on the code and ended up with
---------------------------------
#!/usr/local/bin/pythonw
print 'hello world'
---------------------------------
> ./test.py
./test.py: line 3: print: command not found
Hmmmmm, I changed to script to
---------------------------------
#!/usr/local/bin/python
print 'hello world'
---------------------------------
> ./test.py
hello world
The first script still works from BBEdit, so I tried
launching pythonw from
the command line:
> pythonw
Python 2.4.1 (#2, Mar 31 2005, 00:05:10)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1666)] on
darwin
Type "help", "copyright",
"credits" or "license" for more
information.
>>> print 'Hello world'
Hello world
>>>
I don't understand ... what am I missing?
--
Jan Erik Moström, www.mostrom.pp.se
_______________________________________________
Pythonmac-SIG maillist - Pythonmac-SIG python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
|