Clearing globals in CPython
marco.buttu at gmail.com
Wed Oct 1 18:39:20 CEST 2014
On 01/10/2014 18:00, Steven D'Aprano wrote:
> Out of curiosity, I ran:
> in the interactive interpreter. It broke much more than I expected!
> Built-ins were no longer available, and import stopped working.
> Obviously the easiest way to recover is to exit the current session and
> restart it, but as a challenge, can we recover from this state?
>>> .__class__.__module__ # It is a string...
So, I do not have any idea about how to get a module without importing
something. Thanks for sharing :)
INAF-Osservatorio Astronomico di Cagliari
Via della Scienza n. 5, 09047 Selargius (CA)
Phone: 070 711 80 217
Email: mbuttu at oa-cagliari.inaf.it
More information about the Python-list