Most common #! format

Frederic LAURENT frederic.laurent at sxb.bsf.alcatel.fr
Thu Mar 2 03:17:32 EST 2000


Chuck Esterbrook wrote:
> 
> What's the most common #! format?
> 
> #!python
> #!/usr/local/bin/python
> #!/usr/bin/env python
> 
> or something else?


It's point out the location of the python interpretor.
try this

make a file with 2 lines : t.py
#!/usr/local/bin/python  #the path of your python interpretor
print "foo"

Then you give the "x" right on the file, so it can be executed.
then you can try

> t.py
foo


If you suppress the first line of your t.py file, then you have
> t.py
t.py: print: not found



-- 
Frédéric LAURENT
mailto:frederic.laurent at sxb.bsf.alcatel.fr
Tél : (33) 03 90 67 67 90  poste 74701



More information about the Python-list mailing list