[Python-checkins] CVS: python/dist/src/Lib webbrowser.py,1.1,1.2

Guido van Rossum python-dev@python.org
Sun, 3 Sep 2000 10:12:54 -0700


Update of /cvsroot/python/python/dist/src/Lib
In directory slayer.i.sourceforge.net:/tmp/cvs-serv20475

Modified Files:
	webbrowser.py 
Log Message:
Hack the Windows code to use os.popen().
The returned file is assigned to an instance variable;
otherwise the implied close hangs for a long time.


Index: webbrowser.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/webbrowser.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** webbrowser.py	2000/07/09 16:45:56	1.1
--- webbrowser.py	2000/09/03 17:12:50	1.2
***************
*** 184,190 ****
  class WindowsDefault:
      def open(self, url, new=0):
!         import win32api, win32con
!         win32api.ShellExecute(0, "open", url, None, ".",
!                               win32con.SW_SHOWNORMAL)
  
      def open_new(self, url):
--- 184,188 ----
  class WindowsDefault:
      def open(self, url, new=0):
!         self.junk = os.popen("start " + url)
  
      def open_new(self, url):