[Tutor] What's up with Python 2.5.1's IDLE?
Dick Moores
rdm at rcblue.com
Tue Sep 4 11:53:05 CEST 2007
At 02:35 AM 9/4/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.
You've given me a new toy! Thanks.
>Try HELP SET for more info
That's a LOT of 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
Just to make sure I understand, do you mean that the effects of using
SET do not last between rebootings?
Thanks, Alan.
Dick
More information about the Tutor
mailing list