Next / Previous / Contents / TCC Help System / NM Tech homepage

21.16. reload(): Reload a module

This function reloads a previously loaded module (assuming you loaded it with the syntax “import moduleName”. It is intended for conversational use, where you have edited the source file for a module and want to test it without leaving Python and starting it again. General form:


The moduleName is the actual name of the module, not a string containing its name. For example, if you have imported a module like this:

import parrot

you would say “reload(parrot)”, not “reload('parrot')”.