[Tutor] Python development-moving from Windows to Linux (finally)
Michael Lange
klappnase at freenet.de
Thu Apr 22 15:37:07 EDT 2004
On Thu, 22 Apr 2004 11:32:34 -0700 (PDT)
Tony Cappellini <tony at tcapp.com> wrote:
>
>
> On Thu, 22 Apr 2004, Chris Lott wrote:
>
> > Tony Cappellini wrote:
> >
> > >
> > > I've installed Python on a linux system, and now I'm trying to understand
> > > how to better configure my environment for executing python scripts that
> > > I've written.
> >
> > I think you have two paths confused. As I understand it, $PYTHONPATH is
> > just for the location of Python executables, modules, etc.
> >
> > If you want to run your scripts without specifying the location, they
> > need to be somewhere in your $PATH, which specifies where the shell
> > looks for executables when you try to run them. So just add
> > /home/tony/bin to your $PATH variable.
> >
>
> This is already in the path. It was a default, I didn't add it.
> This is why I don't understand why I need to use
> /home/tony/bin/myscript.py to run my scripts.
>
>
That's really strange. Anyway, if you don't want to mess around with your PATH you
might link your files to /usr/local/bin which is usually a good place for locally
installed stuff. Just do
ln -s /home/tony/bin/myscript.py /usr/local/bin/myscript
as root , and you should be able to start it from any directory.
Michael
More information about the Tutor
mailing list