Mitchell Model <m...@acm.org> added the comment:

Thanks. I sure couldn't find a way!

I encountered this trying to convert someone else's code. There is a
main directory and a subdirectory, both with __init__.py files. The
files in the main directory import each other just by "import
othermodule". 2to3 changed those to "from . import othermodule", which
works. There is a module in the sub-package, say 'm', which files in the
main package want to import, which they were doing by "import
subdirectory.m". I'm glad 2to3 can't figure out what to do and, as per
your explanation, I guess there isn't anyway to make this work. So I
have to ask, though perhaps this isn't the place, how would a module in
a package import a module from a sub-package of that package (where the
sub-package includes the module in its all list). I've tried a lot of
variations and am not doing any better than 2to3 on this. Suggestions?

----------
status: closed -> open

_______________________________________
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

Reply via email to