Re: [GENERAL] running pg_dump from python

2009-06-22 Thread Dimitri Fontaine
Hi, Erik Jones writes: > On Jun 15, 2009, at 5:17 AM, Jasen Betts wrote: > >> On 2009-06-14, Garry Saddington wrote: >>> def backup(): >>>import os >>>os.popen("c:/scholarpack/postgres/bin/pg_dump scholarpack > >>> c:/scholarpack/ancillary/scholarpack.sql") >> >> are you sure you're

Re: [GENERAL] running pg_dump from python

2009-06-20 Thread Jasen Betts
On 2009-06-18, Erik Jones wrote: > > On Jun 15, 2009, at 5:17 AM, Jasen Betts wrote: > >> On 2009-06-14, Garry Saddington wrote: >>> I ahve the following python file that I am running as an external >>> method >>> in Zope. >>> >>> def backup(): >>>import os >>>os.popen("c:/scholarpack/

Re: [GENERAL] running pg_dump from python

2009-06-18 Thread Erik Jones
On Jun 15, 2009, at 5:17 AM, Jasen Betts wrote: On 2009-06-14, Garry Saddington wrote: I ahve the following python file that I am running as an external method in Zope. def backup(): import os os.popen("c:/scholarpack/postgres/bin/pg_dump scholarpack > c:/scholarpack/ancillary/scho

Re: [GENERAL] running pg_dump from python

2009-06-15 Thread Jasen Betts
On 2009-06-14, Garry Saddington wrote: > I ahve the following python file that I am running as an external method > in Zope. > > def backup(): > import os > os.popen("c:/scholarpack/postgres/bin/pg_dump scholarpack > > c:/scholarpack/ancillary/scholarpack.sql") are you sure you're usi

Re: [GENERAL] running pg_dump from python

2009-06-14 Thread Tom Lane
Garry Saddington writes: >> import os >> os.popen("c:/scholarpack/postgres/bin/pg_dump scholarpack > >> c:/scholarpack/ancillary/scholarpack.sql") > scholarpack but no OS user scholarpack, but why should it create a file > then not fill the contents? Because that's exactly what will happen if

Re: [GENERAL] running pg_dump from python

2009-06-14 Thread Garry Saddington
Scott Mead wrote: On Sun, Jun 14, 2009 at 4:06 PM, Garry Saddington mailto:ga...@schoolteachers.co.uk>> wrote: I ahve the following python file that I am running as an external method in Zope. def backup(): import os os.popen("c:/scholarpack/postgres/bin/pg_dump schola

Re: [GENERAL] running pg_dump from python

2009-06-14 Thread Scott Mead
On Sun, Jun 14, 2009 at 4:06 PM, Garry Saddington < ga...@schoolteachers.co.uk> wrote: > I ahve the following python file that I am running as an external method in > Zope. > > def backup(): > import os > os.popen("c:/scholarpack/postgres/bin/pg_dump scholarpack > > c:/scholarpack/ancillary/

[GENERAL] running pg_dump from python

2009-06-14 Thread Garry Saddington
I ahve the following python file that I am running as an external method in Zope. def backup(): import os os.popen("c:/scholarpack/postgres/bin/pg_dump scholarpack > c:/scholarpack/ancillary/scholarpack.sql") data=open('c:/scholarpack/ancillary/scholarpack.sql','r') r=data.read()