[Tutor] python from shell
SA
sarmstrong13@mac.com
Tue, 09 Jul 2002 09:18:25 -0500
On 7/9/02 7:37 AM, "Scot W. Stevenson" <scot@possum.in-berlin.de> wrote:
> Hello Guillermo,
>
>> You have to add #! and the path of your python command in the first line
>> of your code. In my case is:
>> #! /usr/bin/python
>
> I've been using
>
> #!/usr/bin/env python
>
> instead with no ill effects so far - which, if I understand correctly,
> gives the program the environment variables, too.
>
> Y, Scot
The only problem I've seen with this so far is when I write a cgi script.
For some reason /usr/bin/env chokes my Apache server and spews an error. In
a regular python script, this works fine for me. I just changed that line to
the direct route to python for my cgi scripts.
Good Luck.
SA
--
"I can do everything on my Mac I used to on my PC. Plus a lot more ..."
-Me