"Shrutarshi Basu" <technorapt...@gmail.com> wrote in message news:376fbdcf0812151438w53c8f3f7rc1dc481b52428...@mail.gmail.com...
Suppose I have a module that I want to import called ImMod1 that's
saved in a variable like so:

var = "ImMod1"

Is there some way to import ImMod1 by using var?
Thanks,
Basu

mod = __import__(var)

-Mark


_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to