From: Ype K. <yk...@xs...> - 2001-09-29 09:09:46
|
Frank, >I'm writing a little utility that will run a Jython script and when it >catches an error it will open an editor and jump to the line number that >contains the offending script. I'm starting with a Java application and am >correctly catching a forced example exception. Jython gives the exception a >PyException object. From PyException how may I get a PyTraceback object, so >I may get the line number from tb_lineno? Have look at the traceback module. It's straightforward to do this in Jython, and I suspect you are getting the hang of doing jython things directly in java, (which I prefer to avoid :) )... Have fun, Ype Btw. I just started using jEdit: higly recommended, good syntax highlighting for python code. |