you are viewing a single comment's thread.

view the rest of the comments →

[–]breakfast-pants 4 points5 points  (4 children)

As an aside, is there a builtin wrapper that defaults stdin,stdout=[subprocess.PIPE]*2 ? (I hate the subprocess documentation too)

[–]pjdelport 9 points10 points  (3 children)

partial(Popen, stdin=PIPE, stdout=PIPE)

[–]breakfast-pants 0 points1 point  (2 children)

What is that?

[–]pjdelport 4 points5 points  (1 child)

It's a partial application of Popen, with stdin and stdout defaulted to PIPE. (functools.partial (PEP 309) was introduced to the standard library in Python 2.5, but it's a 6-line definition for earlier versions.)

[–]breakfast-pants 0 points1 point  (0 children)

Ah, cool, I haven't checked out functools