From: Fernando P. <fpe...@gm...> - 2006-11-08 16:57:45
|
On 11/8/06, Stefan van der Walt <st...@su...> wrote: > This looks very interesting. It works for me on simple scripts, but > whenever I include the lines > > from numpy.testing import set_local_path > set_local_path('../../..') > > in the input, pycachegrind aborts with > > File "/home/stefan//lib/python2.4/site-packages/numpy/testing/numpytest.py", line 68, in set_local_path > if f.f_locals['__name__']=='__main__': > KeyError: '__name__' > > I guess this is because the script is run in a separate namespace. > I've managed to work around the problem by changing the definition of > 'run' to: Good catch, thanks, I've fixed the public version with your changes. Best, f |