dynamic module import?

Steven D'Aprano steve at REMOVE-THIS-cybersource.com.au
Fri Jan 16 19:13:49 EST 2009


On Fri, 16 Jan 2009 21:34:01 -0800, Eduardo Lenz wrote:

> modu = "os"
> exec("from " + modu + " import *")

"from module import *" is generally frowned upon, although it does 
occasionally have its uses.

By the way, I think your computer's clock is set wrong. My newsclient is 
reporting that you sent your post at 4:30pm today -- and I'm writing this 
at 11am. Perhaps your timezone is set wrong?

Regards,


-- 
Steven



More information about the Python-list mailing list