Comment on Dynamically importing Python modules by filename

CHS2048@gmail.com
Wed, 28 Jul 2010 17:04:55 +0000

This is nice. If I where to reload(module) after changing the contents of filename, what would happen? Presumably I would have to re-run CreateModule to re-exec the file contents. But If I re-initialised variable holding the old module with the new (modified) module, would all the code based on that module update? classes initialised from the module would need to be re-initialised, wouldn't they?