[DB-SIG] Running shp2pgsql from Python

Ervin Ramonllari ramonllari16359 at itc.nl
Mon Jul 30 11:00:32 CEST 2007

Hello all,

thank you for your answer.

I resolve that problem in this way

import os
cmd='dir/sh2pgsql.exe ' + option + shpafile + ' > '+ sqlfile

option - one of the options accepted by shp2pgsql, it can be ommited, by default is '-c'
shpafile - full path of shape file
sqlfile - full path of sql file that will be written



More information about the DB-SIG mailing list