Hello George,<br><br>You can also try Psycopg2:<br><a href="http://initd.org/">http://initd.org/</a><br><br><br>
Best regards,<br>Ivo.<br><br><br><br><div class="gmail_quote">2011/4/15 Jorge Arévalo <span dir="ltr"><<a href="mailto:jorge.arevalo@deimos-space.com">jorge.arevalo@deimos-space.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Hi George,<br>
<br>
I suggest you to use PyGreSQL to connect with PostgreSQL from Python:<br>
<a href="http://www.pygresql.org/" target="_blank">http://www.pygresql.org/</a><br>
<br>
About the queries to extract the info, just check<br>
<a href="http://postgis.refractions.net/documentation/manual-1.5/reference.html" target="_blank">http://postgis.refractions.net/documentation/manual-1.5/reference.html</a><br>
<br>
Best regards,<br>
<font color="#888888"><br>
--<br>
Jorge Arévalo<br>
Internet & Mobilty Division, DEIMOS<br>
<a href="mailto:jorge.arevalo@deimos-space.com">jorge.arevalo@deimos-space.com</a><br>
<a href="http://es.linkedin.com/in/jorgearevalo80" target="_blank">http://es.linkedin.com/in/jorgearevalo80</a><br>
<a href="http://mobility.grupodeimos.com/" target="_blank">http://mobility.grupodeimos.com/</a><br>
<a href="http://gis4free.wordpress.com" target="_blank">http://gis4free.wordpress.com</a><br>
<a href="http://geohash.org/ezjqgrgzz0g" target="_blank">http://geohash.org/ezjqgrgzz0g</a><br>
</font><div><div></div><div class="h5"><br>
<br>
On Fri, Apr 15, 2011 at 11:37 AM, Marco Lechner - FOSSGIS e.V.<br>
<<a href="mailto:marco.lechner@fossgis.de">marco.lechner@fossgis.de</a>> wrote:<br>
> hi georg,<br>
><br>
> this is no postgis-specific question. You connect from python as connecting<br>
> to any postgresql-DB. You just have a bunch of postgis-functions available<br>
> on SQl-side<br>
><br>
> Marco<br>
><br>
> P.S. if you are familiar with python you also could write new functions in<br>
> postgreSQL using plpythonu as processing language within postgis/postgreSQL<br>
><br>
> Am 15.04.2011 11:17, schrieb George Washington:<br>
><br>
> Hi, I am new to postgis (1.5 under Win 7) but have read enough to feel<br>
> hopeful that it could be just what I need. I have a very large number of<br>
> shape files which I have loaded in my first postgis database generating some<br>
> hundreds of tables with vector data. So far so good, but now I need to use<br>
> it to create queries and extract information in batch using Python. I have<br>
> seen statements by people who used Python to access postgis databases but I<br>
> have not been able to find any coded examples which show :<br>
> 1) how to connect to the database<br>
> 2) how to perform queries on the data<br>
> 3) how to extract the results from the queries, etc...<br>
><br>
> (all of which can be done in Python easily with MySql )<br>
><br>
> Can you please point me to any document which gives examples or code<br>
> fragments to do the above.<br>
> Many thanks,<br>
> George<br>
><br>
> _______________________________________________<br>
> postgis-users mailing list<br>
> <a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>
> <a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
><br>
><br>
> _______________________________________________<br>
> postgis-users mailing list<br>
> <a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>
> <a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
><br>
><br>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
</div></div></blockquote></div><br>