How would I import with __import__ from dict values?<br>I want sys.path value inside d['syspath'], below code doesn't work for me<br><br><br>d={}<br>d['sys']='sys'<br>d['path']='path'<br>
<br>d['syspath']=__import__(d['sys'],fromlist=[d['path']])<br><br>and how come does above line doesn't give me diff value than below line?<br><br>d['syspath']=__import__(d['sys'])<br>
<br>Meaning, when I do this doesn't work. Which makes sense.<br>d['syspath']()<br>d['syspath'].d['path']<br><br>but this works both with fromlist and without.<br><br>d['syspath'].path<br>
<br><br clear="all">-Alex Goretoy<br><a href="http://www.goretoy.com">http://www.goretoy.com</a><br><br>