Inquiry regarding the name of subprocess.Popen class

Derek Martin code at pizzashack.org
Tue Sep 2 09:28:42 EDT 2008


On Tue, Sep 02, 2008 at 12:27:49PM +0000, Marc 'BlackJack' Rintsch wrote:
> > The Python class is a generalization of the standard Posix function of
> > (almost) the same name:
> > http://opengroup.org/onlinepubs/007908775/xsh/popen.html
> 
> So it's a name of a *function* and it's a little bit unsuitable for a 
> *class*.  As Jeremy wrote: the instances represent *processes* not 
> "popen"s, whatever that may be.

I would argue that they don't represent processes at all; the object
is a set of files which connect the standard I/O streams of a
subprocess to its parent, and methods to operate on those files.  The
C library's popen() function, on which this class is based, provides a
means to open a file and connect it to the standard steams of a
subprocess, making it more closely analogous to what the Popen class
does/provides.  As such, "Popen" is a better name to describe this
object than "subprocess" would be.  

-- 
Derek D. Martin
http://www.pizzashack.org/
GPG Key ID: 0x81CFE75D

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20080902/d9dec87c/attachment-0001.sig>


More information about the Python-list mailing list