damonwang / xraylarch

X-ray Analysis Applications with Larch and Python
http://cars.uchicago.edu/ifeffit/Larch
1 stars 0 forks source link

need stack traces #17

Open damonwang opened 14 years ago

damonwang commented 14 years ago

problem is, the python interpreter will supply a stack trace with a new call frame for every element of the larch AST, which would be unreadable.

Instead, we should construct a stack trace by looking for function calls in the larch code, each of which will correspond to a python on_call frame handling an ast.Call node.

damonwang commented 14 years ago

current implementation assumes all larch code in scope comes from the last file it read; this needs fixing.

We might have to wrap the raw ASTs in something that can track this metadata, if I can't find a way to just shove it into the AST itself.

damonwang commented 14 years ago

Never mind the previous, I can just manually push things into __dict__

damonwang commented 14 years ago

Also, right now all the arguments are off by one: that is, when I say

  File "c:\users\dwang\appdata\local\temp\larchcmpiyt", line 9, in f(10)

    #enddef

--> f(10)

I mean, the next frame should be f(10)