[pywin32-checkins] pywin32/Pythonwin/pywin/framework intpyapp.py, 1.13, 1.14
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2008-12-06 00:39:23
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21551/Pythonwin/pywin/framework Modified Files: intpyapp.py Log Message: Use win32ui.DisplayTraceback for early errors, and use fully-qualified module names in the dde conversation with existing processes. Index: intpyapp.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework/intpyapp.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** intpyapp.py 4 Dec 2008 05:21:13 -0000 1.13 --- intpyapp.py 6 Dec 2008 00:39:16 -0000 1.14 *************** *** 158,163 **** return 1 except: ! win32ui.MessageBox("There was an error in the DDE conversation with Pythonwin") ! traceback.print_exc() def InitInstance(self): --- 158,164 ---- return 1 except: ! # It is too early to 'print' an exception - we ! # don't have stdout setup yet! ! win32ui.DisplayTraceback(sys.exc_info(), " - error in DDE conversation with Pythonwin") def InitInstance(self): *************** *** 248,252 **** elif argType=="/rundlg": if dde: ! dde.Exec("import scriptutils;scriptutils.RunScript('%s', '%s', 1)" % (args[argStart], ' '.join(args[argStart+1:]))) else: import scriptutils --- 249,253 ---- elif argType=="/rundlg": if dde: ! dde.Exec("from pywin.framework import scriptutils;scriptutils.RunScript('%s', '%s', 1)" % (args[argStart], ' '.join(args[argStart+1:]))) else: import scriptutils *************** *** 254,258 **** elif argType=="/run": if dde: ! dde.Exec("import scriptutils;scriptutils.RunScript('%s', '%s', 0)" % (args[argStart], ' '.join(args[argStart+1:]))) else: import scriptutils --- 255,259 ---- elif argType=="/run": if dde: ! dde.Exec("from pywin.framework import scriptutils;scriptutils.RunScript('%s', '%s', 0)" % (args[argStart], ' '.join(args[argStart+1:]))) else: import scriptutils *************** *** 270,278 **** raise TypeError("Command line arguments not recognised") except: ! typ, val, tb = sys.exc_info() ! print "There was an error processing the command line args" ! traceback.print_exception(typ, val, tb, None, sys.stdout) ! win32ui.OutputDebug("There was a problem with the command line args - %s: %s" % (repr(typ),repr(val))) ! tb = None # Prevent a cycle --- 271,276 ---- raise TypeError("Command line arguments not recognised") except: ! # too early for print anything. ! win32ui.DisplayTraceback(sys.exc_info(), " - error processing command line args") |