PYTHONPATH unnecessary with PythonWin?

John Roth newsgroups at jhrothjr.com
Wed Dec 31 15:59:42 EST 2003


"r.e.s." <r.s at ZZmindspring.com> wrote in message
news:gpGIb.14334$lo3.1830 at newsread2.news.pas.earthlink.net...
> I have no PYTHONPATH nor any other python-related environment
> variables, yet everything seems fine.  (I'm using PythonWin
> with winxp.)  As long as modules are loaded through PythonWin,
> is PYTHONPATH unnecessary?  Or am I missing something?

sys.path is initialized to automatically provide access to the
standard parts of the Python installation; it is not necessary
to have a PYTHONPATH environment variable for this.
You can also stick things in sys.path with a foo.pth file.
It's only when you want to get outside of the standard libraries
that you need the PYTHONPATH environment variable.

Since I'm running Windows, I don't have "a" command line,
I have one for each project, and I simply initialize PYTHONPATH
in the command line startup for what I need for that project.

John Roth






More information about the Python-list mailing list