Customizing the python search path depending on source directory

Peter Hansen peter at engcorp.com
Thu Apr 8 09:37:10 EDT 2004


Peter Schwalm wrote:

> Does the output look different if you run these programs in your
> environment?

It may take me a moment to get the precise same configuration
on my machine, because I don't have it set up to execute
.py scripts automatically at the command line just by typing
their names.  I have to manually invoke "python" and pass it
the name of the script.

Therefore, before I do this (I need to learn how, first),
can you confirm that you get identical results if in each
place where you typed "test1.py" you instead typed the
equivalent with, for example, "python test1.py"?

It's possible Windows' technique for directly invoking
scripts your way screws up the sys.path stuff...

(I _am_ using "stock" Python 2.3.3 on XP, by the way.  I
doubt ActiveState's behaves any different in this respect.)

-Peter



More information about the Python-list mailing list