Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/scintilla
In directory sc8-pr-cvs1:/tmp/cvs-serv23586
Modified Files:
IDLEenvironment.py
Log Message:
Don't mask ImportErrors loading the IDLE extensions, and report the
details of the error in the message box.
Index: IDLEenvironment.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/scintilla/IDLEenvironment.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** IDLEenvironment.py 2 Jul 2003 04:09:55 -0000 1.9
--- IDLEenvironment.py 29 Nov 2003 06:37:40 -0000 1.10
***************
*** 23,34 ****
modname = "pywin.idle." + module
__import__(modname)
! except ImportError:
! # See if I can import it directly (IDLE is probably on the path)
! modname = module
! try:
! __import__(modname)
! except ImportError:
! win32ui.MessageBox("The IDLE extension '%s' can not be located.\r\n\r\nPlease correct the installation and restart the application." % module)
! return None
mod=sys.modules[modname]
mod.TclError = TextError # A hack that can go soon!
--- 23,32 ----
modname = "pywin.idle." + module
__import__(modname)
! except ImportError, details:
! msg = "The IDLE extension '%s' can not be located.\r\n\r\n" \
! "Please correct the installation and restart the" \
! " application.\r\n\r\n%s" % (module, details)
! win32ui.MessageBox(msg)
! return None
mod=sys.modules[modname]
mod.TclError = TextError # A hack that can go soon!
|