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 = pr

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 cmd:di

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

2008-08-19 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 thi