Kaydet (Commit) ee763951 authored tarafından Fred Drake's avatar Fred Drake

simplify imports

üst acc68cc2
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
"""Interfaces for launching and remotely controlling Web browsers.""" """Interfaces for launching and remotely controlling Web browsers."""
# Maintained by Georg Brandl. # Maintained by Georg Brandl.
import io
import os import os
import shlex import shlex
import sys import sys
...@@ -223,7 +224,6 @@ class UnixBrowser(BaseBrowser): ...@@ -223,7 +224,6 @@ class UnixBrowser(BaseBrowser):
cmdline = [self.name] + raise_opt + args cmdline = [self.name] + raise_opt + args
if remote or self.background: if remote or self.background:
import io
inout = io.open(os.devnull, "r+") inout = io.open(os.devnull, "r+")
else: else:
# for TTY browsers, we need stdin/out # for TTY browsers, we need stdin/out
...@@ -348,7 +348,6 @@ class Konqueror(BaseBrowser): ...@@ -348,7 +348,6 @@ class Konqueror(BaseBrowser):
else: else:
action = "openURL" action = "openURL"
import io
devnull = io.open(os.devnull, "r+") devnull = io.open(os.devnull, "r+")
# if possible, put browser in separate process group, so # if possible, put browser in separate process group, so
# keyboard interrupts don't affect browser as well as Python # keyboard interrupts don't affect browser as well as Python
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment