Help replacing os.system call with subprocess call
fairwinds at eastlink.ca
Mon Apr 7 17:26:36 CEST 2008
Hi Matt. Many thanks. Sorry I had not seen your second post. I'll give
this a try and time the completion to compare the differences and post
back later today to show os.system, buffered imput and using a file
directly for stdout.
Matt Nordhoff wrote:
> David Pratt wrote:
>> Hi David and Matt. I appreciate your help which has got me moving
>> forward again so many thanks for your reply. I have been using
>> subprocess.Popen a fair bit but this was the first time I had to use
>> subprocess to capture large file output. The trouble I was having was
>> with the process would just hang. Chunking was the solution. I guess I
>> assumed this would be taken care of in the internals.
>> Overall, I wish subprocess had some better documentation since it is
>> definitely not a drop in replacement for os.system. In other
>> circumstances I am using subprocess.call() for simple calls which works
>> The speed of this solution is slower than os.system. Would a queue of
>> some kind be needed to speed this up? Has anyone implemented something
>> like this? Many thanks.
> Did you see my second message? That should help performance. If not, I'm
> totally out of my depth and have no idea at all. Sorry.
> (How much slower? 10%? 200%?)
More information about the Python-list