Mitchell Model <m...@acm.org> added the comment: Yes, I meant to mention that: the directory sub does contain an __init__.py with "__all__ = ['s']". I'm attaching a zip of the test package pkg that contains the sub-package sub.
It wasn't clear to me what "import sub.s" should be converted to. By analogy with the conversion of "import m" to "from . import m", I had expected "import sub.s" to be converted "from . import sub.s". However, that is a syntax error (which I don't understand, actually). What works is "from sub import s" but that could import from a sub module found anywhere; it isn't changed to a relative import. I don't see how to write a relative import of a subpackage's module. I don't doubt that I am confused about something here, but I've experimented with many variations and can't get it straightened out. ---------- Added file: http://bugs.python.org/file14095/pkg.zip _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6129> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com