Re: [Tutor] feeding data to subprocess exes and getting results without writing files

2007-01-11 Thread Barton David
PROTECTED] On Behalf Of Christopher Arndt Sent: 09 January 2007 14:26 To: Tutor@python.org Subject: Re: [Tutor] feeding data to subprocess exes and getting results without writing files Barton David schrieb: > I just can't wrap my head around stdin, stdout and the whole pipes >

Re: [Tutor] feeding data to subprocess exes and getting results without writing files

2007-01-09 Thread Christopher Arndt
Barton David schrieb: > I just can't wrap my head around stdin, stdout and the whole pipes > thing, but there's got to be a relatively simple way to do this, surely? You have to distinguish between three different concepts: 1) file names 2) file objects 3) file contents 1) Is just a string with

[Tutor] feeding data to subprocess exes and getting results without writing files

2007-01-09 Thread Barton David
Hi there, I can easily use the subprocess module to run a separate exe from within MyScript.py.. e.g. import subprocess process=subprocess.Popen("myprog.exe -i inputfile.txt -o outputfile.txt") ..and that's just fine as far as it goes, if I don't mind creating 'inputfile.txt' first, and reading