[Python-3000-checkins] r67544 - python/branches/py3k/Lib/webbrowser.py

Guido van Rossum guido at python.org
Fri Dec 5 06:56:35 CET 2008


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
<python-3000-checkins at python.org> wrote:
> 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
> _______________________________________________
> 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/)


More information about the Python-3000-checkins mailing list