* 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
ring if
> > there is a better way. From help(os) - I don't find any variables dedicated
> > to
> > holding exit status.
>
> According to:
> http://docs.python.org/library/popen2.html
> <http://docs.python.org/library/popen2.html>
>
> " The onl
* 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->
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
According to:
http://docs.python.org/library/popen2.html
<http://docs.python.org/library/popen2.html>
" The only way to retrieve the return codes for the child processes is
by using the poll() or wait() methods on the Popen3
<http://docs.python.org/library/popen2.html#popen2.Popen3&
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.popen4 I do the following:
>>> fin,fout = os.popen4('/home/AKM
julian wrote:
Hi all,
I know it's a kind of bizarre question but here I go: I want to
execute an script using popen4. This script executes a command in turn
using popen4 too. The first one throws a 256 exit code.
Any suggestions?
Popen4 is gone in 3.0 and I presume deprecated in 2.6, rep
Hi all,
I know it's a kind of bizarre question but here I go: I want to
execute an script using popen4. This script executes a command in turn
using popen4 too. The first one throws a 256 exit code.
Any suggestions?
Thanks
J.
--
http://mail.python.org/mailman/listinfo/python-list
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
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""&q
[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
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.rea
hi
i have to execute some SQL statements against a database using a SQL
client
i want to use the os.popen4 module
can someone correct the way i use os.popen4?
thanks
fin = "select * from some_table" #sql statement
client = "osql server user password" #sql client syntax
fin, fout = os.popen4(client
On 2006-05-30, Grant Edwards <[EMAIL PROTECTED]> wrote:
doesn't
V
> However, the presence/absence of the global affect whether the
> OSError happens or not.
--
Grant Edwards grante
On 2006-05-30, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> On Tue, 30 May 2006 03:01:54 -, Grant Edwards <[EMAIL PROTECTED]>
> declaimed the following in comp.lang.python:
>
>> watching = False
>
> You do realize that this is a LOCAL definition, and is NOT the same
> "watch
I'm having problems calling the Popen4 object wait() method
from a thread. The folloing program produces an error on some
machines (but seems to work on others)
--8<--
import time
import threading
import popen2
def monit
Sorry about the single-author thread; I have been googling for answers
and trying out for 3 nights... I just want to record to save others the
trouble.
> Earlier this evening, I wrote:
> > Short description: Using a wxPython based app, I would like to take a
> > python script in an editor window,
Earlier this evening, I wrote:
> Short description: Using a wxPython based app, I would like to take a
> python script in an editor window, invoke the python interpreter and
> use another window as stdin/stdout/stderr.
>
[snip]
Ok, I got almost everything working ... except the stdin redirection.
I
Short description: Using a wxPython based app, I would like to take a
python script in an editor window, invoke the python interpreter and
use another window as stdin/stdout/stderr.
Based on what I've read so far, I've figured that I need to do
something like:
f_in, f_out = popen4(
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
> "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:
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
>>>>> "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!")
>>&
Hi all. I'm trying to execute system commands and capture the output by
using popen4:
stdout example:
>>>exec_cmd = popen2.popen4("echo hello!")
>>>output = exec_cmd[0].read()
hello
stderr example:
>>>exec_cmd = popen2.popen4("echobv hello!")
24 matches
Mail list logo