[Tutor] sys.path..... - PATH, one more time...
alan.gauld@bt.com
alan.gauld@bt.com
Thu, 6 Dec 2001 17:31:18 -0000
> I have seen reference to sys.path and have looked at the
> Library Reference but I am unsure how it works.
As I understand it Python appends the contents of PYTHONPATH
to the sys.path.
I think it first inserts the standard values already loaded
from the registry, then adds the PYTHONPATH ones.
But I could be wrong about that bit. You can add values
to sys.path at run time and it has the same effect as if you'd
added them to PYTHONPATH. The advantage is that PYTHONPATH only
gets set when you run AUTOEXEC.BAT. Setting sys.path takes
immediate effect.
Alan g.