[IPython-dev] __file__ bug
Fri Mar 23 01:13:06 CDT 2007
On 6/30/06, Ville Vainio <email@example.com> wrote:
> On 6/27/06, sebastian rooks <firstname.lastname@example.org> wrote:
> > but in the same file, the line:
> > 1484 sys.modules[prog_ns['__name__']] = FakeModule(prog_ns)
> > modify the __file__ value through a change introduce by changeset 1322 line 39
> > in FakeModule.py:
> > 38 # modules should have a __file__ attribute
> > 39 adict['__file__'] = __file__
> It was made by Fernando to fix misbehaving help() in python 2.3
> (IIRC), so I don't think I should just revert the patch. If this is
> really required for py 2.3 (Fernando's input appreciated, if he still
> remembers the rationale for setting the module of FakeModule.py as the
> __file__ for the %run-ed file), I guess we could put a test for python
> version and provide the correct __file__ for py 2.4 (and leave this
> feature pseudo-broken for py 2.3, i.e. the way it is now).
I made a small change that should fix the reported problem without any
undue side effects. Committed to SVN as r2169.
Thanks for the original report, and sorry this was so incredibly delayed!
More information about the IPython-dev