[Tutor] PYTHONPATH: where to set on Win9x

Daniel Yoo dyoo@hkn.eecs.berkeley.edu
Wed, 13 Jun 2001 16:00:19 -0700 (PDT)


On Wed, 13 Jun 2001, Christian Mascher wrote:

> So I guess I only have to use PYTHONPATH for having my personal
> directories turn up in sys.path, is that right? Meaning I only need to
> put set PYTHONPATH=d:\mypython in autoexec.bat to include that
> directory. It works, but is it "the right way" or did I miss a point?

Yes.  PYTHONPATH's for personal configuration --- if we have a bunch of
modules that we've written, we can plunk them anywhere in the PYTHONPATH,
and we'll be able to reuse them.  That's what makes Python really neat:
even the simplest programs that we write are already reusable without too
much work.


> By the way, is the global autoexec.bat really the best place for
> putting this? Normally, when I use a console-started compiler (like
> javac for

It actually depends on what Windows edition we're using.  Up to Win98,
putting it in autoexec.bat was the one of the better choices, since
there's only one "user".  On NT and Win2k, each user has a set of
personalized variables, modifiable through the Control Panel.  I forget
the control-panel applet name, but it has the word "Environment Variables"
in it somewhere.


> Hope I'm not asking the same questions Patrick O'Brien and Daniel Yoo
> just sorted out, but I'm really still confused about the issue.

No problem; just as long as we don't contradict ourselves, I think we'll
be fine... *grin*