Is there a way to import a modified script module twice?

Gerhard Häring gh at ghaering.de
Thu Oct 30 07:30:15 EST 2003


Phipps Xue wrote:
> Dear all,
> 
> I wanna reload a script module after it's modified so that I can use
> the new function immediately. [...]

Use the reload() builtin function. The parameter for reload is the 
module to reload. Yes, modules are objects, too in Python :)

-- Gerhard






More information about the Python-list mailing list