Ezio Melotti <ezio.melo...@gmail.com> added the comment:

>From a quick look it seems to me that only 
-   output = Popen(["mycmd", "myarg"], stdout=PIPE).communicate()[0]
+   output = check_output(["mycmd", "myarg"])

can be changed.
Most of the other example access attributes of the Popen objects, such as 
stdin/stdout. subprocess.call is already used in a few places.

Another thing that I wanted to fix for a while is the syntax highlight in these 
examples.  Using '# becomes' instead of '==>' solves the problem for most of 
the examples, except for the first two that use `...`.  Using two separate 
blocks is another option.  A table with two columns (before/after) might also 
work, but it's difficult to get it wide enough to contain both the examples 
side by side.

About moving the convenience functions first, I'm not sure it works too well.
"This module defines one class called Popen:"
could be replaced by
"This module defines a class called Popen, and the convenience functions 
call(), check_call(), and check_output():"
where the three functions and possibly 'convenience functions' link to to the 
part of the page where they are defined.

----------
type: behavior -> 

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue13237>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to