Re: ironpython exception line number

2007-06-30 Thread Troels Thomsen
>If you're hosting IronPython and catching this from a .NET language >then you'll be catching the .NET exception. Yes >In that case you can access the original Python exception >from ex.Data["PythonExceptionInfo"]. Yes ! YES ! Thx regards tpt -- http://mail.python.org/mailman/listinfo/pytho

RE: ironpython exception line number

2007-06-28 Thread Dino Viehland
Given a file foo.py: def f(): You should get these results: IronPython 1.0.60816 on .NET 2.0.50727.312 Copyright (c) Microsoft Corporation. All rights reserved. >>> try: ... execfile('foo.py') ... except IndentationError, e: ... import sys ... x = sys.exc_info() ... >>> print x[1].fi