No ideas?![]()
I'm wanting to import a specific class via a choice thats made by the user. The following is the flawed code that I came up with (but doesn't 'compile' ...)
I would also like to remove the class if that is possible on demand as well.Code:def packageSelect(self, event, package): self.package_type = package import ("%s" % ("" + LIB_PATH + self.package_type + "_package.py")) return package
Any ideas?
No ideas?![]()
Truth be told I"ve never seen this done.
Does this help?
http://forums.devshed.com/t180067/s.html
http://mail.python.org/pipermail/pyt...ay/222723.html
I just googled for 'python "conditional import"' and 'python dynamic import'
Bookmarks