Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def reset_interpreter(old_globals):
- r"""This method will reset a python interpreters globals dictionary with
- the one provided as the input parameter.
- """
- for k in globals().keys():
- print k
- if k == '__builtins__':
- continue
- else:
- try:
- del globals()[k]
- del locals()[k]
- except:
- continue
- print globals()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement