MRAB wrote:
How about something like this:
def clear_workspace():
keep_set = set(['__builtins__', '__doc__', '__name__',
'clear_workspace'])
For 2.6/3.0, add __package__ to the list to be kept.
for x in globals().keys():
if x not in keep_set:
del globals()[x]
--
http://mail.python.org/mailman/listinfo/python-list
-- http://mail.python.org/mailman/listinfo/python-list
