]> granicus.if.org Git - python/commitdiff
simplify imports
authorFred Drake <fdrake@acm.org>
Wed, 10 Dec 2008 06:02:39 +0000 (06:02 +0000)
committerFred Drake <fdrake@acm.org>
Wed, 10 Dec 2008 06:02:39 +0000 (06:02 +0000)
Lib/webbrowser.py

index 39f9b99390c4ce5b5578713e3a389918ca6dfb8b..fb227fec8d0a8b4e02eac89c9e6221a7d236bac3 100644 (file)
@@ -2,6 +2,7 @@
 """Interfaces for launching and remotely controlling Web browsers."""
 # Maintained by Georg Brandl.
 
+import io
 import os
 import shlex
 import sys
@@ -223,7 +224,6 @@ class UnixBrowser(BaseBrowser):
         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
@@ -348,7 +348,6 @@ class Konqueror(BaseBrowser):
         else:
             action = "openURL"
 
-        import io
         devnull = io.open(os.devnull, "r+")
         # if possible, put browser in separate process group, so
         # keyboard interrupts don't affect browser as well as Python