> > def make_module_from_file(module_name, file_name): > """ Make a new module object from the code in specified file """ > > from types import ModuleType > module = ModuleType(module_name) > > module_file = open(file_name, 'r') > exec module_file in module.__dict__
Thank you very much. And can you tell me what does " exec module_file in module.__dict__ " mean? Thanx -- http://mail.python.org/mailman/listinfo/python-list