|
Thanks for the reply, but it seems I run into the same problem like
before when I use the subprocess module. I modified your example in the following way: ---- echo.py import sys if __name__ == '__main__': while 1: indata = sys.stdin.readline() if indata=='end\n': break sys.stdout.write( 'echo>'+indata) sys.stdout.flush() #!!!!!!!!!!!! don't work without ---- caller.py import subprocess if __name__ == '__main__': child = subprocess.Popen( ['python', 'echo.py'], stdin=subprocess.PIPE, stdout=subprocess.PIPE ) i=1 while i<10: child.stdin.write('spam'+str(i)+'\n') data = "" print data i+=1 child.stdin.write('end\n') Now the problem arises if I comment line 8 "sys.stdout.flush()" or replace line 7 and 8 by "print 'echo>'+indata" The tool I try to automate has the same behavior. But there must be a way to get the text that is printed by the tool. Is it necessary to use more low-level access and in which way, win32file, etc... ? Tschau, Frank [EMAIL PROTECTED] wrote: On 7/11/05, Frank Guenther <[EMAIL PROTECTED]> wrote:Hi All, |
_______________________________________________ Python-win32 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-win32
