A problem about ipython

Vincent Ren renws1990 at gmail.com
Sun Apr 3 00:19:30 CEST 2011

On Apr 2, 1:16 am, Robert Kern <robert.k... at gmail.com> wrote:
> In order to support pickling and its %run feature, IPython makes a fake __main__
> module. It looks like profile.run() explicitly imports __main__ to try to run
> the statement there. Honestly, it's been a thorn in our side for a long time,
> but it's a confusing bit of the code. Most interactive shells actually written
> in Python are going to have a similar need to do a workaround, since they
> already have a __main__. The regular shell is not written in Python, so it has
> no problem.
> You will want to ask on the IPython list for future IPython questions.
>    http://mail.scipy.org/mailman/listinfo/ipython-user
> --
> Robert Kern
> "I have come to believe that the whole world is an enigma, a harmless enigma
>   that is made terrible by our own mad attempt to interpret it as though it had
>   an underlying truth."
>    -- Umberto Eco

Quite nice explanation and very useful link, thanks :)

More information about the Python-list mailing list