[issue1396825] subprocess: wait for a period of time

2008-08-22 Thread gd2shoe

gd2shoe <[EMAIL PROTECTED]> added the comment:

This is just common sense.  I'm trying to avoid a poll() busy-wait
section of code.  I'll figure it out, but it would be much, much easier
if wait accepted a number of seconds, and returned None if the process
was still going (cf. Popen.poll() ).

I'm much happier with subprocess than os.popen*.  I'm also glad that
Popen.kill() is slated for 3.0 .

Since this isn't in the 3.0b3 documentation, I assume this either isn't
fixed or planned?  Are there implementation difficulties?

--
nosy: +gd2shoe

___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1396825>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15804] Feature request, implicit "except : pass"

2012-08-28 Thread gd2shoe

New submission from gd2shoe:

I'm constantly finding myself writing itty-bitty try blocks like such:

process stuff
try : someSubProcess.kill()
except : pass
process stuff

I realize this isn't a rigorous use of except, but it's good enough for a vast 
majority of what I need it for.  Still, it adds excess verbiage and makes code 
slightly harder to read.

All I need except to do most of the time is suppress exceptions.  I think the 
language could be enhanced by making the except clause implicit.

the above would become:

process stuff
try : someSubProcess.kill()
process stuff

The intent remains clear.  The code is cleaner and easier to read.

This does not happen often in rigorous code, but grep does find 3 counts in 
standard modules and 9 counts in numpy.  I'm certain most prototype code (like 
mine) would greatly benefit.  (My current 300 line project uses 4 so far.)

--
components: Interpreter Core
messages: 169326
nosy: gd2shoe
priority: normal
severity: normal
status: open
title: Feature request, implicit "except : pass"
type: enhancement
versions: Python 2.7, Python 3.4

___
Python tracker 
<http://bugs.python.org/issue15804>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com