[Tutor] Python development-moving from Windows to Linux (finally)

Alan Gauld alan.gauld at blueyonder.co.uk
Thu Apr 22 16:15:07 EDT 2004


> Just like a binary exectuable, I would like to have all of my
executable
> python scripts in one directory (ie /home/tony/bin - or whatever I
> decide).
>
> However, when I'm not in the directory where my python scripts are,
I find
> that I need to add the explicit path to the python script, in order
to be
> able to run it
> /home/tony/bin/myscript.py

You just need to add the python script directory to your PATH
variable.
PYTHONPATH controls where python looks for modules. PATH controls
where the Unix shell looks for executables.

So once you add the home/tony/bin directory to PATH in your .profile
or .login or .cshrc (or whatever for the shell you use) it should all
just work.

HTH,

Alan G.




More information about the Tutor mailing list