Launching Python programs from Linux shell script
Steve Holden
steve at holdenweb.com
Mon Sep 12 11:42:42 EDT 2005
Ernesto wrote:
> Thanks! How do you add Python in Linux to the path? Similar to
> setting environment variables in Windows. I want to be able to type
> "python" when I'm in any directory to launch the interpreter. Thanks!
>
You will (or should) have a shell intialisation file variously called
.profile, .bashrc or several other possible names. Consult your shell
documentation (or ask another user who knows) to find out which.
You will need to add a line which typically reads something like
export PATH=$PATH:/path/to/directory/containing/python
making the obvious substitution of the correct path. Interestingly I
couldn't quickly formulate a Google search specifically containing
Python, but a search for
unix add to path
gives the quite helpful
http://www.ee.surrey.ac.uk/Teaching/Unix/unix8.html
as its first result.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/
More information about the Python-list
mailing list