[Python-checkins] r61020 - python/trunk/Demo/tkinter/guido/ShellWindow.py
georg.brandl
python-checkins at python.org
Sat Feb 23 23:14:02 CET 2008
Author: georg.brandl
Date: Sat Feb 23 23:14:02 2008
New Revision: 61020
Modified:
python/trunk/Demo/tkinter/guido/ShellWindow.py
Log:
Use os.closerange().
Modified: python/trunk/Demo/tkinter/guido/ShellWindow.py
==============================================================================
--- python/trunk/Demo/tkinter/guido/ShellWindow.py (original)
+++ python/trunk/Demo/tkinter/guido/ShellWindow.py Sat Feb 23 23:14:02 2008
@@ -121,11 +121,7 @@
sys.stderr.write('popen2: bad write dup\n')
if os.dup(c2pwrite) <> 2:
sys.stderr.write('popen2: bad write dup\n')
- for i in range(3, MAXFD):
- try:
- os.close(i)
- except:
- pass
+ os.closerange(3, MAXFD)
try:
os.execvp(prog, args)
finally:
More information about the Python-checkins
mailing list