Re: Newbie question about sending and receiving data to the command prompt.

2008-08-24 Thread Gabriel Genellina
En Fri, 22 Aug 2008 18:25:49 -0300, n00m [EMAIL PROTECTED] escribió: Is it possible to communicate in loop fashion? import subprocess as s proc = s.Popen('cmd.exe', stdin=s.PIPE, stdout=s.PIPE) while 1: cmd = raw_input('cmd:') res =

Re: Newbie question about sending and receiving data to the command prompt.

2008-08-22 Thread n00m
Is it possible to communicate in loop fashion? import subprocess as s proc = s.Popen('cmd.exe', stdin=s.PIPE, stdout=s.PIPE) while 1: cmd = raw_input('cmd:') res = proc.communicate(cmd + '\n')[0] print res

Re: Newbie question about sending and receiving data to the command prompt.

2008-08-20 Thread Gabriel Genellina
En Tue, 19 Aug 2008 16:48:26 -0300, aditya shukla [EMAIL PROTECTED] escribi�: I am using windows vista and i am trying to send data to the command prompt ,this is what is done. import subprocess proc =subprocess.Popen('cmd.exe',stdin=subprocess.PIPE) proc.communicate('abc') when i run this

Newbie question about sending and receiving data to the command prompt.

2008-08-19 Thread aditya shukla
Hello folks, I am using windows vista and i am trying to send data to the command prompt ,this is what is done. import subprocess proc =subprocess.Popen('cmd.exe',stdin=subprocess.PIPE) proc.communicate('abc') when i run this the command prompt just blinks and disappears , can anyone explain