[Tutor] A way to restart a script after it runs?

Jacob S. keridee at jayco.net
Fri Oct 22 02:14:58 CEST 2004


>I'm not sure what the OP wants to accomplish, but this probably won't do
>it. Imported modules are cached in sys.modules. 'del myscript' unbinds the
>name myscript from <module 'myscript'> in the current namespace; it doesn't
>actually unload the module itself.
>
>reload(myscript) may do what you want, it will force the module to be
>reloaded. A better description of the problem would help.

I ran it on the interpreter, and it tested out okay. I don't know if that
matters any, but it stands with me.
Jacob



More information about the Tutor mailing list