Re: bash command, get stdErr

2011-08-26 Thread Tracubik
Il Fri, 26 Aug 2011 01:20:02 -0700, Chris Rebert ha scritto: > On Fri, Aug 26, 2011 at 12:56 AM, Tracubik wrote: >> Il Thu, 25 Aug 2011 01:52:25 -0700, Chris Rebert ha scritto: >>> On Thu, Aug 25, 2011 at 1:25 AM, Tracubik wrote: Hi all! >> >> cut >> >>> Untested: >>> >>> from subprocess im

Re: bash command, get stdErr

2011-08-26 Thread Tracubik
Il Thu, 25 Aug 2011 08:25:59 +, Tracubik ha scritto: > Hi all! > i'ld like to execute via Python this simple bash command: > > sudo las > > las is intended to be a typo for "ls" > > the point is that i want to see in the terminal the stderr message (that > is "sorry, try again" if i insert

Re: bash command, get stdErr

2011-08-26 Thread Chris Rebert
On Fri, Aug 26, 2011 at 12:56 AM, Tracubik wrote: > Il Thu, 25 Aug 2011 01:52:25 -0700, Chris Rebert ha scritto: >> On Thu, Aug 25, 2011 at 1:25 AM, Tracubik wrote: >>> Hi all! > > cut > >> Untested: >> >> from subprocess import Popen, PIPE sudo = Popen("sudo las", shell=True, >> stderr=PIPE) >>

Re: bash command, get stdErr

2011-08-26 Thread Tracubik
Il Thu, 25 Aug 2011 01:52:25 -0700, Chris Rebert ha scritto: > On Thu, Aug 25, 2011 at 1:25 AM, Tracubik wrote: >> Hi all! cut > Untested: > > from subprocess import Popen, PIPE sudo = Popen("sudo las", shell=True, > stderr=PIPE) > tee = Popen(["tee", "/dev/stderr"], stdin=sudo.stderr, stdout=

Re: bash command, get stdErr

2011-08-25 Thread Chris Rebert
On Thu, Aug 25, 2011 at 1:25 AM, Tracubik wrote: > Hi all! > i'ld like to execute via Python this simple bash command: > > sudo las > > las is intended to be a typo for "ls" > > the point is that i want to see in the terminal the stderr message (that > is "sorry, try again" if i insert the wrong p