Re: [Python-Dev] slightly misleading Popen.poll() docs

2013-01-22 Thread Chris Withers
On 05/12/2012 17:15, Steven D'Aprano wrote: """ Check if child process has terminated. Returns None while the child is still running, any non-None value means that the child has terminated. In either case, the return value is also available from the instance's returncode attribute. """ Do you w

Re: [Python-Dev] slightly misleading Popen.poll() docs

2012-12-05 Thread Nick Coghlan
On Thu, Dec 6, 2012 at 4:55 AM, Antoine Pitrou wrote: > On Thu, 06 Dec 2012 04:15:08 +1100 > Steven D'Aprano wrote: > > Possibly because it is 4am here, I had to read this three times to > understand it. > > How is this instead? > > > > """ > > Check if child process has terminated. Returns None

Re: [Python-Dev] slightly misleading Popen.poll() docs

2012-12-05 Thread Antoine Pitrou
On Thu, 06 Dec 2012 04:15:08 +1100 Steven D'Aprano wrote: > On 06/12/12 03:08, Chris Withers wrote: > > > I'd like to change the docs for poll() to say: > > > > """ > > Check if child process has terminated. > > If it has, the returncode attribute will be set and that value will be > > returned.

Re: [Python-Dev] slightly misleading Popen.poll() docs

2012-12-05 Thread Steven D'Aprano
On 06/12/12 03:08, Chris Withers wrote: I'd like to change the docs for poll() to say: """ Check if child process has terminated. If it has, the returncode attribute will be set and that value will be returned. If it has not, None will be returned and the returncode attribute will remain None.

Re: [Python-Dev] slightly misleading Popen.poll() docs

2012-12-05 Thread Chris Withers
On 05/12/2012 16:34, Antoine Pitrou wrote: http://docs.python.org/3/library/subprocess.html#subprocess.Popen.poll The doc looks clear to me. poll() returns the returncode attribute which is described thusly: "A None value indicates that the process hasn’t terminated yet." Therefore, I don't u

Re: [Python-Dev] slightly misleading Popen.poll() docs

2012-12-05 Thread Antoine Pitrou
Le Wed, 05 Dec 2012 16:08:46 +, Chris Withers a écrit : > Hi All, > > Would anyone object to me making a change to the docs for 2.6, 2.7 > and 3.x to clarify the following: > > http://docs.python.org/3/library/subprocess.html#subprocess.Popen.poll The doc looks clear to me. poll() returns t

[Python-Dev] slightly misleading Popen.poll() docs

2012-12-05 Thread Chris Withers
Hi All, Would anyone object to me making a change to the docs for 2.6, 2.7 and 3.x to clarify the following: http://docs.python.org/3/library/subprocess.html#subprocess.Popen.poll A couple of my colleagues have ended up writing code like this: proc = Popen(['some', 'thing']) code = proc.poll