On Apr 2, 1:16 am, Robert Kern <robert.k...@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 :) -- http://mail.python.org/mailman/listinfo/python-list