[Python-bugs-list] popen2.popen3 and win32pipe.popen3 has unconsistancy interface. (PR#386)

2jerry@writeme.com 2jerry@writeme.com
Wed, 5 Jul 2000 05:58:04 -0400 (EDT)


Full_Name: Jerome.vacher
Version: 1.5.2 (build 129)
OS: Sun, SGI, NT, Win98
Submission from: thotsc10.thomson-csf.fr (195.101.37.183)


Hello,
this is my second bug submission in 2 days and my second bug submission in my
life :)
Is it a bug ? 
Where is the bug ?

posix     : popen2.popen3(output, input, error)
win32pipe : win32pipe.popen3(input, output, error)

Need an ntpopen.py module as ntpath.py do ? oh cool idea for the dude who does
it.
I used next code to continue using popen3 in that situation but what a shame to
do so.

[...]
def CC_popen3(commande, mode):
  global nb                                   # forget this .. this is just to
  if V: print __module__+": IN CC_popen3",nb  # capture number of open pipe 
  nb = nb + 1                                 # seem to hang popen2.popen3
after
                                              # about 170 calls.
                                              # (no further expert so forget)
  if sys.platform == "win32":
    from win32pipe import popen3
    (i,o,e) = popen3(commande, mode)
    return (i,o,e)
  elif os.name == "posix":
    from popen2 import popen3
    (o,i,e) = popen3(commande, mode)
    return (i,o,e)
  else:
    raise CC_env_error, "env: CC_popen3 : ERROR : Unsupported Operating System"
[...]

QUESTION / DISCUSSION:
 what is the best way ? (i,o,e) or (o,i,e) ? i choose (i,o,e) cause this is a
reading behaviour and is more comprehensive. I know that choose is subjective.
 So what need the futur to be ?
 Tel me that convergence is THE way. never mind about the order ;-)

Jerome.vacher 
jerome.vacher@tts.thomson-csf.com / jvacher@on-x.com
Alias Jerry 'the foolish dracomorpheus'.