dynamic module import?

Steven D'Aprano steve at REMOVE-THIS-cybersource.com.au
Sat Jan 17 01:13:49 CET 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?



More information about the Python-list mailing list