[IPython-dev] An idea: unique synthetic filenames

Fernando Perez fperez.net at gmail.com
Fri Sep 26 16:07:04 EDT 2008


On Mon, Sep 22, 2008 at 2:23 PM, Robert Kern <robert.kern at 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