This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Fixpythonbugs
Recipients Fixpythonbugs
Date 2013-01-03.05:52:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1357192331.61.0.693606949117.issue16846@psf.upfronthosting.co.za>
In-reply-to
Content
Instead of giving the error message " Attempted relative import in non-package", simply process the line!

from . import Example

whether or not the file is __main__, it should be able to go up one directory, if possible, and try to import Example.py.  It makes no sense that this cannot be done.
History
Date User Action Args
2013-01-03 05:52:11Fixpythonbugssetrecipients: + Fixpythonbugs
2013-01-03 05:52:11Fixpythonbugssetmessageid: <1357192331.61.0.693606949117.issue16846@psf.upfronthosting.co.za>
2013-01-03 05:52:11Fixpythonbugslinkissue16846 messages
2013-01-03 05:52:10Fixpythonbugscreate