New submission from FizzledOut: 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. ---------- components: Windows messages: 178913 nosy: Fixpythonbugs priority: normal severity: normal status: open title: relative import solution type: resource usage versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16846> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com