Discussion:
[Python-3000-checkins] r67544 - python/branches/py3k/Lib/webbrowser.py
fred.drake
2008-12-05 02:47:42 UTC
Permalink
Author: fred.drake
Date: Fri Dec 5 03:47:42 2008
New Revision: 67544

Log:
add missing import


Modified:
python/branches/py3k/Lib/webbrowser.py

Modified: python/branches/py3k/Lib/webbrowser.py
==============================================================================
--- python/branches/py3k/Lib/webbrowser.py (original)
+++ python/branches/py3k/Lib/webbrowser.py Fri Dec 5 03:47:42 2008
@@ -223,6 +223,7 @@
cmdline = [self.name] + raise_opt + args

if remote or self.background:
+ import io
inout = io.open(os.devnull, "r+")
else:
# for TTY browsers, we need stdin/out
Guido van Rossum
2008-12-05 05:56:35 UTC
Permalink
It's unlikely that you'll avoid importing io.py, since it's used to
initialize sys.stdio. why not import it at the top of the module? Or
define a global _builtin_open = open that you can use?

On Thu, Dec 4, 2008 at 6:47 PM, fred. drake
Post by fred.drake
Author: fred.drake
Date: Fri Dec 5 03:47:42 2008
New Revision: 67544
add missing import
python/branches/py3k/Lib/webbrowser.py
Modified: python/branches/py3k/Lib/webbrowser.py
==============================================================================
--- python/branches/py3k/Lib/webbrowser.py (original)
+++ python/branches/py3k/Lib/webbrowser.py Fri Dec 5 03:47:42 2008
@@ -223,6 +223,7 @@
cmdline = [self.name] + raise_opt + args
+ import io
inout = io.open(os.devnull, "r+")
# for TTY browsers, we need stdin/out
_______________________________________________
Python-3000-checkins mailing list
Python-3000-checkins at python.org
http://mail.python.org/mailman/listinfo/python-3000-checkins
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
Loading...