Alan Gauld said unto the world upon 11/04/2006 06:47 PM: > [EMAIL PROTECTED]:~/test$ ls -la shebangtest.py > -rwxr-xr-- 1 brian brian 68 2006-11-04 02:29 shebangtest.py > > so the file is called shebangtest.py... > >> [EMAIL PROTECTED]:~/test$ shebangtest >> bash: shebangtest: command not found > > but you try to run shebangtest... > > bash can't find the file. you didn't put the .py on the end
Well, shebangtest.py also didn't work as evidenced by one of the lines you snipped. > Also you may not have . in your path. For security reasons it isn't > there by default. > > Try > > [EMAIL PROTECTED]:~/test$ ./shebangtest.py And that would be it. It didn't occur to me to try ./shebangtest.py in lieu of the bare shebangtest.py. My command-line instinct were installed back in the days of using DOS on an XT. DOS (at least the version I used) first checked the cwd and only then searched the path. The security implications that Alan and Rick pointed to make the POSIX/bash behaviour make perfect sense on reflection, though. Thanks to all who replied, both on and off list, Brian vdB _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor