[Pythonmac-SIG] ok, i am stumped!
Calvin
calvin@xmission.com
Sat, 5 Oct 2002 13:21:46 -0600 (MDT)
> But it still only works with the full path, so i am able to do:
>
> % /usr/bin/python2.2 foo.py
>
> but not:
>
> % foo.py
>
I agree with Just, that you need to fix the #! header to /usr/bin/python
/usr/bin/python ran my test cgi's just fine when I first installed 10.2:
old: #!/bin/env python
new: #!/usr/bin/python
then fix the print line to use one kind of quote...single or double, but
not both:
old: print 'hello kevin"
new: print "hello kevin"
If authorities are set right and you are in the same directory as the
program, run the program by typing "./programname"
Hope this helps.
-calvin
ps.
For start to finish instructions on a default 10.2 install this might
work...in a terminal window...
Go to your home directory by typing:
cd ~
Type the following to use pico to make a file:
pico mypgm.py
Copy and paste this bit into the term window running pico:
#!/usr/bin/python
print "hello kevin"
Type ctrl-x, then "y" to save your file (mypgm.py)
To set up authorities of owner rwx, group rx, and everyone rx type:
chmod 755 "mypgm.py"
Then to run the program try:
./mypgm.py
It should produce a line:
hello kevin