[Tutor] Unsure why won't work

Jeff Shannon jeff@ccvcorp.com
Thu Jul 31 14:52:26 2003


Elizabeth Bernert wrote:

> I changed the top line to the line the works in my comp to get 
> programs working, (i.e. #!c:/Python22/python.exe) but that did not 
> work..  Does anyone have any ideas? 


What *precisely* are you doing that's not working?

If you're running Windows (as I presume you are from the above comment), 
then the shebang line doesn't matter -- that's a unix convention, and to 
Windows it looks like an ordinary comment line.  

Under Win9x, you must use the python command to run a script -- i.e., $ 
python tail.py somefile.txt

Under Win2k/XP, it's possible to have Explorer recognize files with a 
.py extension as being executable and associated with the python 
interpreter.  I believe that the installer (at least for the ActiveState 
distribution) does this automatically.  In that case, you'd only need to 
type $ tail somefile.txt (provided, of course, that tail.py is located 
on your $PATH).

Jeff Shannon
Technician/Programmer
Credit International