[Tutor] IDLE question

Steve lonetwin at gmail.com
Fri Jul 9 16:35:00 CEST 2004


Hi Dick,
> Thanks very much, Steve. That works fine, even though it's more typing
> than I was hoping for..
you could always wrap it in a function and add the function to the
list in the if statement. Also you may want to add this function to a
startup file (eg: ".pystartup") and then set the environment variable
"PYTHONSTARTUP=.pystartup". This would load make the function
available each time you fire up python.

HTH
Steve


On Fri, 09 Jul 2004 07:13:22 -0700, Dick Moores <rdm at rcblue.com> wrote:
> Steve wrote at 05:47 7/9/2004:
> >So, to do what you asked for, you can simply do something like:
> >
> >~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > >>> for i in globals().keys():
> >...     if i not in ['__builtins__', '__doc__', '__file__', '__name__']:
> >...             del globals()[i]
> 
> Thanks very much, Steve. That works fine, even though it's more typing
> than I was hoping for..
> 
> Dick


More information about the Tutor mailing list