[Tutor] What's up with Python 2.5.1's IDLE?

Ricardo Aráoz ricaraoz at gmail.com
Tue Sep 4 16:02:36 CEST 2007


Alan Gauld wrote:
> "Dick Moores" <rdm at rcblue.com> wrote
> 
>>> except you lose the flexibility of changing PYTHONPATH
>>> dynamically during a session using SET.
>> Could you show me how to use SET? And an example where it would be 
>> useful?
> 
> Imagine you are in a DOS command session
> 
> C:> SET PYTHONPATH=C:\MYNEWFOLDER;%PYTHONPATH%
> 
> prepends a folder to PYTHONPATH
> Now next time you run Python it will pick up the extra folder
> 
> C:> SET PYTHONPATH
> 
> displays the current value
> 
> finally
> 
> C:>SET PYTHONPATH=%PYTHONPATH:Python25=Python24%
> 
> edits the existing path to substitute Python24 for each occurence of 
> python25
> 
> SET /P
> 
> allows multi line entry.
> 
> SET is quite surprisingly powerful.
> Try HELP SET for more info
> 
> The big downside is that these changes only apply to the current
> environment. (Which is the point of an *environment* variable after 
> all :-)
> You still need to edit the variable if you want a permanant change
> 
> Alan G 
> 
> 

I seem to remember there was a way (in the wds console) to set it
permanent. Wasn't it 'EXPORT' or something?






More information about the Tutor mailing list