Help replacing os.system call with subprocess call

Matt Nordhoff mnordhoff at mattnordhoff.com
Mon Apr 7 10:10:58 EDT 2008


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
> fine.
> 
> 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.
> 
> Regards,
> David

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 mailing list