]> granicus.if.org Git - python/commitdiff
Hack the Windows code to use os.popen().
authorGuido van Rossum <guido@python.org>
Sun, 3 Sep 2000 17:12:50 +0000 (17:12 +0000)
committerGuido van Rossum <guido@python.org>
Sun, 3 Sep 2000 17:12:50 +0000 (17:12 +0000)
The returned file is assigned to an instance variable;
otherwise the implied close hangs for a long time.

Lib/webbrowser.py

index 5a4a80fa4e94f12614683f06e0799ea00ed945c2..66cdbffc93e1ef71605bba0beaf7fff6be7ea866 100644 (file)
@@ -183,9 +183,7 @@ register("grail", Grail)
 
 class WindowsDefault:
     def open(self, url, new=0):
-        import win32api, win32con
-        win32api.ShellExecute(0, "open", url, None, ".",
-                              win32con.SW_SHOWNORMAL)
+        self.junk = os.popen("start " + url)
 
     def open_new(self, url):
         self.open(url)