[Tutor] how to get response from os.system()

Nathan McBride nomb85 at comcast.net
Mon Mar 17 18:54:09 CET 2008

That's a great tip I'll have to save than.

-----Original Message-----
From: Martin Walsh <mwalsh at groktech.org>
Sent: Monday, March 17, 2008 9:38 AM
To: Nathan McBride <nomb85 at comcast.net>
Cc: tutor at python.org
Subject: Re: [Tutor] how to get response from os.system()

Hi Nathan,

Nathan McBride wrote:
> Yup I use the pexpect module for a lot however couldn't get 'pexpect.run' to work with mysqldump piping to gzip 

Just to hazard a guess -- when you want to pipe commands with pexpect
you have to spawn ('run', it seems, would work the same way) the shell
command as an argument to bash (or similar) since pexpect does not
natively interpret shell operators or wildcards, like redirect, pipe, etc..

More information about the Tutor mailing list