![]() |
Python on unix
Is there a way to get a Python script to run from the command line in Unix without the "python" prefix? For example, instead of typing
python myscript.py, typing myscript.py (with or without the ./)?I know that Perl scripts can be run by simply typing the script name (assuming you are in the enclosing directory). I tried adding a shebang line to my Python script no avail. EDIT: I figured it out. I had to chmod the script to 777. |
Re: Python on unix
You should watch security there: 744 is probably a better permission set. That means only you can read,write and run it while everyone else can just read it. You don't want other users to overwrite your script.
|
| All times are GMT -5. The time now is 9:16 PM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC