Style question: Nicknames for deeply nested objects

Jean-Michel Pichavant jeanmichel at sequans.com
Thu Feb 3 11:31:50 CET 2011


Gerald Britton wrote:
>>
>> however, considering what
>>
>> "import a.module.that.is.quite.nested as myModule"
>>     
>
> Won't work since I get the objects at run time
>
>
>   
myModule = __import__('whatever.module.imported.at.run.time', globals(), 
locals(), [], -1)

See http://docs.python.org/library/functions.html#__import__

JM





More information about the Python-list mailing list