<div dir="ltr">Dear All:<br>I wrote a small python script which could convert shapefile to sql. I still wondering it is possible to run this kind of tool on Apache + Mod_python. <br>Here is my codes. <br><br>import os, string<br>
Psql= &#39;C:\\temp\\bin\\psql.exe &#39;<br>shapefile=&#39;C:\\X_GUAN\\data\\bc_border.shp&#39;<br>sqlfile= &#39;C:\\test.sql&#39;<br>options= &quot;-s 4326 -i -I &quot;<br>Shp2pgsql=&#39;C:\\temp\\bin\\shp2pgsql.exe &#39;<br>
cmd = Shp2pgsql + options + shapefile + &#39; test &gt; &#39; + sqlfile<br>os.system(cmd)<br><br>cmd2 = Psql + &#39;-d databaseTest -f &#39; + sqlfile<br>os.system(cmd2)<br><br>Thanks in advance<br><br>All the best <br><br>
Xiaoyu<br><br><br><br clear="all"><br>-- <br>Xiaoyu Guan (Sam)<br>Geo-information Science<br>Wageningen UR<br><br>
</div>