PYTHONPATH or any other way to set seachpath (winXP) ?

Stef Mientki S.Mientki-nospam at mailbox.kun.nl
Sun Feb 4 05:57:18 EST 2007


Jussi Salmela wrote:
> Stef Mientki kirjoitti:
>> Is it possible to change the searchpath for modules on the flight,
>> under winXP ?
> What do you mean by *on the flight*: inside IDLE? using the command line?

No, I run Python, embedded from within a Delphi program.

>> Most preferred is some command to extend the searchpath.
>> (the environment variable PYTHONPATH needs a reboot)
>>
> No, it doesn't. PYTHONPATH can be updated somewhere in the environment 
> options (sorry: I've got a Finnish language XP version, so I don't 
> remember the exact terms) and the new path comes in effect immediately 
> i.e. the launches after that see the new definition.
> 
Through "My computer" | properties | advanced | Environment Variables"
you have to reboot.
But as I remember well there should be a way, (through the registry or DOS-box ?)
but I don't want to mess in the registry,
I want to keep my application portable.
But the suggestion of Rob, looks perfect.

thanks anyway,
Stef Mientki



More information about the Python-list mailing list