Re: popen4 - get exit status

2012-08-28 Thread Tim Johnson
* Dennis Lee Bieber [120828 07:11]: > On Mon, 27 Aug 2012 15:43:59 -0800, Tim Johnson > declaimed the following in gmane.comp.python.general: > > > * Benjamin Kaplan [120827 15:20]: > > > The popen* functions are deprecated. You should use the subprocess module > > > instead. > > No, I'm stuc

Re: popen4 - get exit status

2012-08-27 Thread Tim Johnson
* Dave Angel [120827 15:20]: > On 08/27/2012 06:39 PM, Tim Johnson wrote: > > In bash I do the following: > > linus:journal tim$ /home/AKMLS/cgi-bin/perl/processJournal-Photo.pl hiccup > > -bash: /home/AKMLS/cgi-bin/perl/processJournal-Photo.pl: No such file or > > directory > > linus:journal tim

Re: popen4 - get exit status

2012-08-27 Thread Tim Johnson
* Benjamin Kaplan [120827 15:20]: > The popen* functions are deprecated. You should use the subprocess module > instead. No, I'm stuck with py 2.4 on one of the servers I'm using and there will not be an upgrade for a few months. I'm really trying to set up something portable between linux->

Re: popen4 - get exit status

2012-08-27 Thread Benjamin Kaplan
On Aug 27, 2012 3:47 PM, "Tim Johnson" wrote: > > In bash I do the following: > linus:journal tim$ /home/AKMLS/cgi-bin/perl/processJournal-Photo.pl hiccup > -bash: /home/AKMLS/cgi-bin/perl/processJournal-Photo.pl: No such file or directory > linus:journal tim$ echo $? > 127 > > In python, use os.p

Re: popen4 - get exit status

2012-08-27 Thread Dave Angel
On 08/27/2012 06:39 PM, Tim Johnson wrote: > In bash I do the following: > linus:journal tim$ /home/AKMLS/cgi-bin/perl/processJournal-Photo.pl hiccup > -bash: /home/AKMLS/cgi-bin/perl/processJournal-Photo.pl: No such file or > directory > linus:journal tim$ echo $? > 127 > > In python, use os.pope

Re: popen4 not returning output

2007-08-20 Thread Michael Bentley
On Aug 19, 2007, at 8:58 PM, [EMAIL PROTECTED] wrote: > I am trying to run the following script: > > > #!/usr/bin/python > > import popen2 > > commandToRun = """scp scp_trial.py [EMAIL PROTECTED]:/targetDirectory""" > #commandToRun = "ls" > print commandToRun > p_out, p_in = popen2.popen4 (comman

Re: popen4 not returning output

2007-08-19 Thread James Stroud
James Stroud wrote: > [EMAIL PROTECTED] wrote: >> I am trying to run the following script: >> >> >> #!/usr/bin/python >> >> import popen2 >> >> commandToRun = """scp scp_trial.py [EMAIL PROTECTED]:/targetDirectory""" >> #commandToRun = "ls" >> print commandToRun >> p_out, p_in = popen2.popen4 (comm

Re: popen4 not returning output

2007-08-19 Thread James Stroud
[EMAIL PROTECTED] wrote: > I am trying to run the following script: > > > #!/usr/bin/python > > import popen2 > > commandToRun = """scp scp_trial.py [EMAIL PROTECTED]:/targetDirectory""" > #commandToRun = "ls" > print commandToRun > p_out, p_in = popen2.popen4 (commandToRun) > > theOut = p_out

Re: popen4

2005-10-19 Thread Ralf Muschall
Ganesan Rajagopal wrote: > Try pexpect instead. http://pexpect.sourceforce.net/ ^ That's a content-free ad site. You probably mean sourceforGe. Ralf -- http://mail.python.org/mailman/listinfo/python-list

Re: popen4

2005-10-18 Thread Ganesan Rajagopal
> "billie" == billie <[EMAIL PROTECTED]> writes: > Piet van Oostrum wrote: >> I think you need something like pyexpect for this. > PyExpect seems to be no more mantained. Try pexpect instead. http://pexpect.sourceforce.net/ Ganesan -- Ganesan Rajagopal (rganesan at debian.org) | GPG Key:

Re: popen4

2005-10-18 Thread billie
Piet van Oostrum wrote: > I think you need something like pyexpect for this. PyExpect seems to be no more mantained. -- http://mail.python.org/mailman/listinfo/python-list

Re: popen4

2005-10-17 Thread Piet van Oostrum
> "billie" <[EMAIL PROTECTED]> (b) wrote: >b> Hi all. I'm trying to execute system commands and capture the output by >b> using popen4: >b> stdout example: > exec_cmd = popen2.popen4("echo hello!") > output = exec_cmd[0].read() >b> hello >b> stderr example: > exec_cmd = popen2.p