Jose' Matos wrote:

>> Feel free to lift any of that code and adapt it to your needs.  With
>> those detailed tracebacks, I've often been able to understand and fix
>> ipython crashes which could only be produced via some obscure
>> combinations of steps relying on specific user data, input or platform I
>> don't have access to.  And yet the tracebacks contain enough info that I
>> can figure out what went wrong and fix it on my side.
> 
>   Clearly I had never thought to go so far to be able to get all the
> debugging information. Thanks for the tip, I will try to implement this
> over the extended weekend as tomorrow is our national day (therefore
> holiday).

Note that getting all that information exactly correct is not 100% trivial (you
need to tokenize the lines around the exceptions in  a fairly careful manner,
and then use that to extract information from the visible namespaces through
the traceback).  I'd strongly encourage you to steal what you want from IPython
before you try to get all the corner cases right yourself.  IPython has had
this code tested in the wild for over 3 years, so by now it's pretty reliable. 
But it didn't exactly start that way  :)

I've gotten enough good things out of lyx over the years, that I'm happy to
contribute something back.

Best,

f

PS (plug) - in case anyone of you is a student and wants to hack on the 'python
as scientific notebooks' idea, you may want to have a look at:

http://ipython.scipy.org/google_soc

Obviously lyx has strongly driven these thoughts, and is explicitly mentioned.

Reply via email to