[Python 2.4/2.5] subprocess module is sorely deficient?

Harishankar v.harishankar at gmail.com
Tue Apr 22 06:52:57 EDT 2008


Hi,

Sorry to start off on a negative note in the list, but I feel that the Python 
subprocess module is sorely deficient because it lacks a mechanism to:

1. Create non-blocking pipes which can be read in a separate thread (I am 
currently writing a mencoder GUI in Tkinter and need a full fledged process 
handler to control the command line and to display the progress in a 
text-box)

2. Kill the subprocess in a platform independent manner (i.e. no third party 
modules and no hacks).

Is there any way to use non-blocking Popen objects using subprocess? and 2 - 
is there a way to kill the subprocess in a platform independent manner in a 
purely Pythonic way? I thought initially that this problem is simple enough, 
but over the last couple of days I've been really struggling to find any 
answer. I've been through dozens of mailing list archives in to find a 
solution. Unfortunately none of the solutions seem to fit my needs.

My only solution seems to be to offer the end user the mencoder command line 
and make them execute it manually and be done with it but that seems a rather 
weak solution.

-- 
Regards,
V. Harishankar

http://hari.literaryforums.org
http://harishankar.org



More information about the Python-list mailing list