Import without a .py file
mross at rochester.rr.com
Fri May 12 03:03:55 CEST 2000
I would like to accomplish the equivalent of an import, but store module
code in a database (rather than in .py files).
Is there any way to create a module using code that did not originate in
a file? For example, I can get the text for the code into a string
object, and then I'd like to say
s = ...string containing code with classes and functions...
import module using s
obviously I can't do that, but something equivalent would be nice.
More information about the Python-list