Re: Inquiry regarding the name of subprocess.Popen class

2008-09-03 Thread Marc 'BlackJack' Rintsch
On Wed, 03 Sep 2008 01:23:47 -0400, Derek Martin wrote: On Wed, Sep 03, 2008 at 12:20:18AM -0400, Miles wrote: The subprocess module is also supposed to replace os.system and os.spawn*, neither of which involve opening pipes. Uh... it's a replacement for os.popen(), which -- guess what --

Re: Inquiry regarding the name of subprocess.Popen class

2008-09-03 Thread Derek Martin
On Wed, Sep 03, 2008 at 12:20:18AM -0400, Miles wrote: Derek Martin wrote: On Tue, Sep 02, 2008 at 10:55:54PM +, Marc 'BlackJack' Rintsch wrote: but the instances of `Popen` are no actions. There's no way to execute a `Popen` instance. Yes there is... you execute it when you

Re: Inquiry regarding the name of subprocess.Popen class

2008-09-03 Thread Marc 'BlackJack' Rintsch
On Tue, 02 Sep 2008 19:54:12 -0400, Derek Martin wrote: And if they model an action there must be some way to activate the action That's a reasonable assumption, but as I also said, the object might just describe the action -- essentially the equivalent of a struct in C. ``struct``\s in C

Re: Inquiry regarding the name of subprocess.Popen class

2008-09-03 Thread Derek Martin
On Wed, Sep 03, 2008 at 06:40:10AM +, Marc 'BlackJack' Rintsch wrote: On Tue, 02 Sep 2008 19:54:12 -0400, Derek Martin wrote: And if they model an action there must be some way to activate the action That's a reasonable assumption, but as I also said, the object might just

Re: Inquiry regarding the name of subprocess.Popen class

2008-09-03 Thread Gabriel Genellina
En Tue, 02 Sep 2008 19:15:07 -0300, Derek Martin [EMAIL PROTECTED] escribió: The Linux man page unfortunately copies (verbatim) the FreeBSD man page, which gets it wrong. You can not open a process, but you can definitely open a pipe. (Ok, if it doesn't agree with you, it must be wrong)

Re: Inquiry regarding the name of subprocess.Popen class

2008-09-03 Thread Marc 'BlackJack' Rintsch
On Wed, 03 Sep 2008 03:09:18 -0400, Derek Martin wrote: On Wed, Sep 03, 2008 at 06:40:10AM +, Marc 'BlackJack' Rintsch wrote: On Tue, 02 Sep 2008 19:54:12 -0400, Derek Martin wrote: And if they model an action there must be some way to activate the action That's a reasonable

Re: Inquiry regarding the name of subprocess.Popen class

2008-09-03 Thread Derek Martin
On Wed, Sep 03, 2008 at 03:16:00PM -0700, Dennis Lee Bieber wrote: On Wed, 3 Sep 2008 03:09:18 -0400, Derek Martin [EMAIL PROTECTED] declaimed the following in comp.lang.python: struct run { int speed; direction_type direction; }; Not a function. Describes an action.

Re: Inquiry regarding the name of subprocess.Popen class

2008-09-03 Thread Gabriel Genellina
En Wed, 03 Sep 2008 21:34:35 -0300, Derek Martin [EMAIL PROTECTED] escribi�: On Wed, Sep 03, 2008 at 03:16:00PM -0700, Dennis Lee Bieber wrote: On Wed, 3 Sep 2008 03:09:18 -0400, Derek Martin [EMAIL PROTECTED] declaimed the following in comp.lang.python: struct run { int speed;

Re: Inquiry regarding the name of subprocess.Popen class

2008-09-02 Thread Gabriel Genellina
En Mon, 01 Sep 2008 04:23:38 -0300, Jeremy Banks [EMAIL PROTECTED] escribió: Hi. I wondered if anyone knew the rationale behind the naming of the Popen class in the subprocess module. Popen sounds like the a suitable name for a function that created a subprocess, but the object itself is a

Re: Inquiry regarding the name of subprocess.Popen class

2008-09-02 Thread Gabriel Genellina
En Mon, 01 Sep 2008 04:23:38 -0300, Jeremy Banks [EMAIL PROTECTED] escribió: Hi. I wondered if anyone knew the rationale behind the naming of the Popen class in the subprocess module. Popen sounds like the a suitable name for a function that created a subprocess, but the object itself is a

Re: Inquiry regarding the name of subprocess.Popen class

2008-09-02 Thread Nicola Musatti
On Sep 1, 9:23 am, Jeremy Banks [EMAIL PROTECTED] wrote: Hi. I wondered if anyone knew the rationale behind the naming of the Popen class in the subprocess module. Popen sounds like the a suitable name for a function that created a subprocess, but the object itself is a subprocess, not a

Re: Inquiry regarding the name of subprocess.Popen class

2008-09-02 Thread Marc 'BlackJack' Rintsch
On Tue, 02 Sep 2008 05:02:07 -0700, Nicola Musatti wrote: On Sep 1, 9:23 am, Jeremy Banks [EMAIL PROTECTED] wrote: Hi. I wondered if anyone knew the rationale behind the naming of the Popen class in the subprocess module. Popen sounds like the a suitable name for a function that created a

Re: Inquiry regarding the name of subprocess.Popen class

2008-09-02 Thread Derek Martin
On Tue, Sep 02, 2008 at 12:27:49PM +, 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

Re: Inquiry regarding the name of subprocess.Popen class

2008-09-02 Thread Marc 'BlackJack' Rintsch
On Tue, 02 Sep 2008 09:28:42 -0400, Derek Martin wrote: On Tue, Sep 02, 2008 at 12:27:49PM +, 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

Re: Inquiry regarding the name of subprocess.Popen class

2008-09-02 Thread Derek Martin
On Tue, Sep 02, 2008 at 01:57:26PM +, Marc 'BlackJack' Rintsch wrote: 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. And the process'

Re: Inquiry regarding the name of subprocess.Popen class

2008-09-02 Thread Marc 'BlackJack' Rintsch
On Tue, 02 Sep 2008 11:39:09 -0400, Derek Martin wrote: On Tue, Sep 02, 2008 at 01:57:26PM +, Marc 'BlackJack' Rintsch wrote: 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,

Re: Inquiry regarding the name of subprocess.Popen class

2008-09-02 Thread Gabriel Genellina
En Tue, 02 Sep 2008 12:39:09 -0300, Derek Martin [EMAIL PROTECTED] escribió: On Tue, Sep 02, 2008 at 01:57:26PM +, Marc 'BlackJack' Rintsch wrote: 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

Re: Inquiry regarding the name of subprocess.Popen class

2008-09-02 Thread Terry Reedy
Gabriel Genellina wrote: Classes represent things, and class names should be nouns. Functions represent actions, and their names should be verbs. popen is a good name for a function; Popen is a bad name for a class. People who don't like Popen should have made this argument when subprocess

Re: Inquiry regarding the name of subprocess.Popen class

2008-09-02 Thread Derek Martin
On Tue, Sep 02, 2008 at 06:47:39PM +, Marc 'BlackJack' Rintsch wrote: That's why I think the name `Popen` is not so good for it. Because it does more than `popen()` and if it is called `Subprocess` or just `Process` then it would be merely an implementation detail, that the `popen()`

Re: Inquiry regarding the name of subprocess.Popen class

2008-09-02 Thread Derek Martin
On Tue, Sep 02, 2008 at 05:22:51PM -0300, Gabriel Genellina wrote: The name popen is an abbreviation of pipe open -- the function, and the class, open pipes to communicate with another process. What you said is correct; however there are numerous other ways to open subprocesses. The

Re: Inquiry regarding the name of subprocess.Popen class

2008-09-02 Thread Marc 'BlackJack' Rintsch
On Tue, 02 Sep 2008 18:15:07 -0400, Derek Martin wrote: Classes represent things, and class names should be nouns. Is that a law? It's a common guideline. Classes are instantiated by invoking their class names as a function call -- the computing equivalent of a verb. Why then, must they

Re: Inquiry regarding the name of subprocess.Popen class

2008-09-02 Thread Derek Martin
On Tue, Sep 02, 2008 at 10:55:54PM +, Marc 'BlackJack' Rintsch wrote: On Tue, 02 Sep 2008 18:15:07 -0400, Derek Martin wrote: Classes represent things, and class names should be nouns. Is that a law? It's a common guideline. Right. It's a guideline. Classes are instantiated

Re: Inquiry regarding the name of subprocess.Popen class

2008-09-02 Thread Terry Reedy
Derek Martin wrote: On Tue, Sep 02, 2008 at 10:55:54PM +, Marc 'BlackJack' Rintsch wrote: It's a way more self explaining name, even for people who know the `popen()` function I, and apparently the maintainers (at least at the time they added this thing) don't agree. In fact I

Re: Inquiry regarding the name of subprocess.Popen class

2008-09-02 Thread Miles
Derek Martin wrote: On Tue, Sep 02, 2008 at 10:55:54PM +, Marc 'BlackJack' Rintsch wrote: but the instances of `Popen` are no actions. There's no way to execute a `Popen` instance. Yes there is... you execute it when you instantiate the object. At the time of instantiation, you open

Re: Inquiry regarding the name of subprocess.Popen class

2008-09-02 Thread Derek Martin
On Wed, Sep 03, 2008 at 12:20:18AM -0400, Miles wrote: Derek Martin wrote: On Tue, Sep 02, 2008 at 10:55:54PM +, Marc 'BlackJack' Rintsch wrote: but the instances of `Popen` are no actions. There's no way to execute a `Popen` instance. Yes there is... you execute it when you

Inquiry regarding the name of subprocess.Popen class

2008-09-01 Thread Jeremy Banks
Hi. I wondered if anyone knew the rationale behind the naming of the Popen class in the subprocess module. Popen sounds like the a suitable name for a function that created a subprocess, but the object itself is a subprocess, not a popen. It seems that it would be more accurate to just name