reloading sys

Tommy Burnette (tnb2d@henson.cs.virginia.edu)
Thu, 31 Mar 1994 18:13:50 GMT

I was trying to see if I could fiddle with the sys module (say
set an attribute or two) and then 'reset' it to its original pristine
state, the one it was in when i first imported it. I decided to try
reload'ing it, thinking it will skip the module cache and get it from
wherever it got it in the first place, right? This is what occured:

Python 1.0.1 (Mar 5 1994)
Copyright 1991-1994 Stichting Mathematisch Centrum, Amsterdam
>>> import sys
>>> sys.ack = 'foo'
>>> print sys.ack
foo
>>> reload(sys)
Traceback (innermost last):
File "<stdin>", line 1
ImportError: No module named sys
>>>

What is going on here?

-- 
					-------> Tommy.

"Subvert the parental paradigm - Refuse Birth."