I mean, can I create them dynamically?
+4
A:
You can create them dynamically, with the imp.new_module method.
Ned Batchelder
2009-09-23 17:59:11
+7
A:
Yes:
>>> import types
>>> m = types.ModuleType("mymod")
>>> m
<module 'mymod' (built-in)>
RichieHindle
2009-09-23 17:59:30
Ah. That's nice.
interstar
2009-09-24 02:34:57