<p style="margin: 0px; padding: 0px;">Thanks,</p><p style="margin: 0px; padding: 0px;">i will try all the choises and i let you know..Thanks</p><p style="margin: 0px; padding: 0px;"><br></p><p style="margin: 0px; padding: 0px;">Francesco<br></p>
<blockquote>
----Messaggio originale----<br>
Da: giohappy@gmail.com<br>
Data: 24/05/2012 17.45<br>
A: "francescoboccacci@libero.it"&lt;francescoboccacci@libero.it&gt;<br>
Cc: &lt;qgis-developer@lists.osgeo.org&gt;<br>
Ogg: Re: Re: [Qgis-developer] from qgis.core impor * Windows problems<br>
<br>
<div class="gmail_quote"><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex" mce_style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p style="margin:0px;padding:0px" mce_style="margin:0px;padding:0px">Hi, i tried to run bat file (C:\OSGeo4W\OSGeo4W.bat), close ms-dos shell and run python</p>
<p style="margin:0px;padding:0px" mce_style="margin:0px;padding:0px"><br></p></blockquote><div><div style="">???</div><div style="">If you close the shell you loose the environmental variables.</div><div style="">OSGeo4W.bat sets env vars for the current shell, they're not kept as system env vars.</div>
<div style="">&nbsp;</div><div style="">You need those environmantal variables to leaverage the osgeo4w libraries.</div><div style="">You ha mainly three choices:</div><div style=""><br></div><div style="">&nbsp;- run your python script inside a shell where you have setup the env variables (like it is done by Osgeo4W.bat)</div>
<div style="">&nbsp;- hard code the environmental variables inside your python script and add them to os.environ, and set the path to the python modules with sys.path</div><div style="">&nbsp;- make the various environmantal variables statically availables as system env vars (Control Panel -&gt; Systems -&gt; etc.)</div>
<div style=""><br></div><div style="">giovanni</div></div><div><br></div><div>&nbsp;</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex" mce_style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p style="margin:0px;padding:0px" mce_style="margin:0px;padding:0px"><br></p><p style="margin:0px;padding:0px" mce_style="margin:0px;padding:0px">
<br></p><p style="margin:0px;padding:0px" mce_style="margin:0px;padding:0px"><br></p><p style="margin:0px;padding:0px" mce_style="margin:0px;padding:0px"><br></p>
<blockquote>
----Messaggio originale----<br>
Da: <a href="mailto:giohappy@gmail.com" mce_href="mailto:giohappy@gmail.com" target="_blank">giohappy@gmail.com</a><br>
Data: 24/05/2012 17.15<br>
A: "<a href="mailto:francescoboccacci@libero.it" mce_href="mailto:francescoboccacci@libero.it" target="_blank">francescoboccacci@libero.it</a>"&lt;<a href="mailto:francescoboccacci@libero.it" mce_href="mailto:francescoboccacci@libero.it" target="_blank">francescoboccacci@libero.it</a>&gt;<br>
Cc: &lt;<a href="mailto:qgis-developer@lists.osgeo.org" mce_href="mailto:qgis-developer@lists.osgeo.org" target="_blank">qgis-developer@lists.osgeo.org</a>&gt;<br>
Ogg: Re: [Qgis-developer] from qgis.core impor * Windows problems<br>
<br>
Hi Francesco,<div>are you using osgeo4w? In that case I suggest you to have a look to the startup .bat files (like C:\OSGeo4W\OSGeo4W.bat), that setup the right evnironment (python pat, bin dires, etc.)</div><div><br></div>

<div>In general you have to add the various Qt and Qgis DLLs to the PATH, and configure the python paths to be able to peak the qgis modules.&nbsp;</div><div><br></div><div>giovanni<br><br><div class="gmail_quote">2012/5/24 <a href="mailto:francescoboccacci@libero.it" mce_href="mailto:francescoboccacci@libero.it" target="_blank">francescoboccacci@libero.it</a> <span dir="ltr">&lt;<a href="mailto:francescoboccacci@libero.it" mce_href="mailto:francescoboccacci@libero.it" target="_blank">francescoboccacci@libero.it</a>&gt;</span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex" mce_style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
i have a problem in my Windows PC. I try to use a python script that call qgis<br>
modules.<br>
I tried to do :<br>
<br>
&gt;&gt;from qgis.core import *<br>
<br>
i receive ImportError: DLL load failed ....<br>
<br>
How i have to configure my environment variables to get these modules?<br>
I try to find some solution on web but they aren't work.<br>
<br>
Thanks<br>
<br>
Francesco<br>
<br>
_______________________________________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org" mce_href="mailto:Qgis-developer@lists.osgeo.org" target="_blank">Qgis-developer@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" mce_href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
</blockquote></div><br></div>
<br>
</blockquote><p><br></p><div style="width:1px;min-height:1px;overflow:hidden">&nbsp;</div></blockquote></div><br>
<br>
</blockquote><p><br></p>