Improve absolute import management for iptest.py
On Mon, Jan 11, 2010 at 11:36 AM, Jörgen Stenarson <email address hidden> wrote:
> I often run IPython/
> now due to a relative import:
> Traceback (most recent call last):
> File "testing\
> from . import globalipapp
> ValueError: Attempted relative import in non-package
Argh, yes. This is unfortunately only fixed for 2.6:
We might just add that boilerplate
if __name__ == "__main__" and __package__ is None:
__package__ = "expected.
protected by a version check, so your approach continues to work.