[IPython-dev] An idea: unique synthetic filenames

Fernando Perez fperez.net@gmail....
Fri Sep 26 15:07:04 CDT 2008


On Mon, Sep 22, 2008 at 2:23 PM, Robert Kern <robert.kern@gmail.com> wrote:
> Currently, for each In[], we compile the input to a code object with a fake
> filename like "<string>" or "<ipython console>". If we were to generate a unique
> fake filename for each input, say "<ipython console 10>" to correspond with
> In[10], we could then stuff the text into linecache. This will be used in
> tracebacks and other similar tools (like my line_profiler).
>
> Worth a shot?

Definitely!  I like it a lot: simple to implement and with good payoff.

Cheers,

f


More information about the IPython-dev mailing list