The results look right! I did a rather large test and the checksum passed.
I will hold off any speed ups as you suggested.
On Wed, Feb 23, 2011 at 8:37 PM, Rob Williscroft wrote:
> Rita wrote in
> news:[email protected] in
> gmane.comp.python.general:
Rita wrote in
news:[email protected] in
gmane.comp.python.general:
[Top post relocated]
> On Tue, Feb 22, 2011 at 7:57 PM, Rob Williscroft
> wrote:
>
>> Rita wrote in
>> news:[email protected] in
>> gmane.co
This is a good solution thanks. You should wiki this somewhere.
For extra points is there a way to speed up the p.stdout.read(bufsize) ?
On Tue, Feb 22, 2011 at 7:57 PM, Rob Williscroft wrote:
> Rita wrote in
> news:[email protected] in
> gmane.comp.
Thanks everyone for your replies.
Chris,
Unfortunately, I can't redirect the output to a file because there are other
processes which use this processes output as stdin.
Rob,
I will give this a try.
On Tue, Feb 22, 2011 at 7:48 PM, Chris Kaynor wrote:
>
> On Tue, Feb 22, 2011 at 3:44 PM, Rita
Rita wrote in
news:[email protected] in
gmane.comp.python.general:
>
> When using wait() it works a bit better but not consistent
> def run(cmd):
> p=subprocess.Popen(cmd,stdout=subprocess.PIPE)
> rc=p.wait()
> print rc
> return p.stdout
>
> W
On Tue, Feb 22, 2011 at 3:44 PM, Rita wrote:
> I have a process like this,
>
> def run(cmd):
> #cmd=a process which writes a lot of data. Binary/ASCII data
> p=subprocess.Popen(cmd,stdout=subprocess.PIPE)
>
> I would like to get cmd's return code so I am doing this,
>
> def run(cmd):
> p=su
On 22/02/2011, at 20:44, Rita wrote:
> I have a process like this,
>
> def run(cmd):
> #cmd=a process which writes a lot of data. Binary/ASCII data
> p=subprocess.Popen(cmd,stdout=subprocess.PIPE)
>
> I would like to get cmd's return code so I am doing this,
>
> def run(cmd):
> p=subpro
On Sun, 14 Nov 2010 19:47:55 +, Tim Harig wrote:
> On 2010-11-14, Camille Harang wrote:
>> # pg_dump prompts for password so I inject it in stdin.
>> pgsql.stdin.write('MY_PASSWORD' + '\n')
>
> For security reasons, some programs use direct access to the TTY system
> for password entry rathe
Tim Harig a écrit :
> On 2010-11-14, Camille Harang wrote:
>> # pg_dump prompts for password so I inject it in stdin.
>> pgsql.stdin.write('MY_PASSWORD' + '\n')
>
> For security reasons, some programs use direct access to the TTY system
> for password entry rather then reading from stdin. Most o
Tim Harig a écrit :
> On 2010-11-14, Camille Harang wrote:
>> # pg_dump prompts for password so I inject it in stdin.
>> pgsql.stdin.write('MY_PASSWORD' + '\n')
>
> For security reasons, some programs use direct access to the TTY system
> for password entry rather then reading from stdin. Most o
On 2010-11-14, Tim Harig wrote:
> On 2010-11-14, Camille Harang wrote:
>> # pg_dump prompts for password so I inject it in stdin.
>> pgsql.stdin.write('MY_PASSWORD' + '\n')
>
> For security reasons, some programs use direct access to the TTY system
> for password entry rather then reading from st
On 2010-11-14, Camille Harang wrote:
> # pg_dump prompts for password so I inject it in stdin.
> pgsql.stdin.write('MY_PASSWORD' + '\n')
For security reasons, some programs use direct access to the TTY system
for password entry rather then reading from stdin. Most of these programs
provide anoth
Hi Chris, thanks for your reply.
Chris Rebert a écrit :
> Quoting http://docs.python.org/library/subprocess.html , emphasis mine:
> """
> On Unix, with shell=True: [...] If args is a sequence, ***the first
> item*** specifies the command string, and any additional items will be
> treated as additi
On Sun, Nov 14, 2010 at 10:50 AM, Camille Harang wrote:
> Hi all,
>
> I'm having a problem with subprocess.Popen. It seems that its unable to
> capture the pg_dump's standard inputs & outputs in a non-shell mode:
>
> from subprocess import Popen, PIPE
>
> # fire pg_dump in order to read data from
14 matches
Mail list logo