creating objects by name
John Lenton <[email protected]> Thu, 8 Jul 2004 00:32:04 -0300
| Newsgroups | gmane.comp.python.modeling |
|---|---|
| Message-ID | <[email protected]> |
I'm certain this has been asked and answered before, but I can't find
it anywhere: how can I create an object by name? By this I mean,
instead of doing
from MyModel.Thing import Thing
a_thing = Thing()
ec.insert(a_thing)
what magic do I use to do
do_magic()
a_thing = more_magic('Thing')
ec.insert(a_thing)
?
--
John Lenton ([email protected]) -- Random fortune:
bash: fortune: command not found
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com