> module_name = "module"
> mod = __import__(module_name)
> class_name = module_name.capitalize()
> cls = getattr(mod, class_name)
> inst = cls()
>
Worked like a magic charm :) Also helped me understand the concept of getattr :D
Thanks a million!
--
warm regards,
Pradnyesh Sawant
--
Be yourself......everyone else is taken. --Anon
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to