<HTML dir=rtl><HEAD><TITLE>Re: [Tutor] Variables in workspace</TITLE>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.2900.3157" name=GENERATOR></HEAD>
<BODY dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2><STRONG>Many thanks</STRONG> to Bob and Kent and all the good people in the tutor forum.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2>The dir() and del work really well !</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>Eli</FONT></DIV>
<DIV dir=rtl><BR></DIV>
<DIV dir=rtl>
<HR tabIndex=-1>
</DIV>
<DIV dir=rtl><FONT face=Tahoma size=2><B>מאת:</B> bob gailer [mailto:bgailer@alum.rpi.edu]<BR><B>נשלח:</B> ש 10/13/2007 17:35<BR><B>אל:</B> Kent Johnson<BR><B>עותק לידיעה:</B> Eli Brosh; tutor@python.org<BR><B>נושא:</B> Re: [Tutor] Variables in workspace<BR></FONT><BR></DIV>
<DIV>
<P><FONT size=2>Kent Johnson wrote:<BR>> bob gailer wrote:<BR>>> The del statement is the way to delete variables. Since dir() gives<BR>>> you their names one needs use eval.<BR>>><BR>>> for varName in dir():<BR>>> eval 'del ' + varName<BR>><BR>> I think del globals()[varName] would work.<BR>Yep. That was nagging a corner of my brain, but not surfacing.<BR><BR><BR></FONT></P></DIV></BODY></HTML>