[Python-checkins] CVS: python/dist/src/Tools/idle EditorWindow.py,1.34,1.35

Fred L. Drake python-dev@python.org
Sun, 9 Jul 2000 12:10:22 -0700


Update of /cvsroot/python/python/dist/src/Tools/idle
In directory slayer.i.sourceforge.net:/tmp/cvs-serv22787
Modified Files:
	EditorWindow.py 
Log Message:
Update to use the new standard webbrowser module if available, otherwise
uses the BrowserControl module.
BrowserControl is not removed to allow IDLE to be distributed separately
and still be used with Python 1.5.2.
Index: EditorWindow.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Tools/idle/EditorWindow.py,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -r1.34 -r1.35
*** EditorWindow.py	2000年05月10日 17:28:42	1.34
--- EditorWindow.py	2000年07月09日 19:10:19	1.35
***************
*** 7,11 ****
 import tkSimpleDialog
 import tkMessageBox
! import BrowserControl
 import idlever
 import WindowList
--- 7,16 ----
 import tkSimpleDialog
 import tkMessageBox
! try:
! import webbrowser
! except ImportError:
! import BrowserControl
! webbrowser = BrowserControl
! del BrowserControl
 import idlever
 import WindowList
***************
*** 28,31 ****
--- 33,37 ----
 
 #$ event <<close-window>>
+ 
 #$ unix <Control-x><Control-0>
 #$ unix <Control-x><Key-0>
***************
*** 299,303 ****
 
 def python_docs(self, event=None):
! BrowserControl.open(self.help_url)
 
 def select_all(self, event=None):
--- 305,309 ----
 
 def python_docs(self, event=None):
! webbrowser.open(self.help_url)
 
 def select_all(self, event=None):

AltStyle によって変換されたページ (->オリジナル) /