[DB-SIG] Running shp2pgsql from Python

Robert Brewer fumanchu at aminus.org
Sun Jul 29 05:57:22 CEST 2007


Ervin Ramonllari wrote:
> import os
> os.execv('mydir/shp2pgsql.exe', args)
> 
> *args is a list of arguments, the same as I pass them using cmd.exe
 
>From the docs on os.execv:

    "In either case, the arguments to the child process
     should start with the name of the command being run,
     but this is not enforced."

Are you doing that? e.g.:

    cmd = 'mydir/shp2pgsql.exe'
    os.execv(cmd, [cmd] + args)


Robert Brewer
fumanchu at aminus.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/db-sig/attachments/20070728/5b1301e8/attachment.html 


More information about the DB-SIG mailing list