[issue1487] PEP 366 implementation
Guido van Rossum
report at bugs.python.org
Fri Nov 30 21:39:11 CET 2007
Guido van Rossum added the comment:
I think the implementation is fine too (others will have to check it
more carefully) but I noticed that the promised functionality of -m
doesn't work yet: I created a file Lib/test/foo.py whose sole contents
was "from . import test_support". Then I tried to import this using
-m:
$ ./python.exe -m test.foo
Traceback (most recent call last):
File "/Users/guido/p/Lib/runpy.py", line 104, in _run_module_as_main
"__main__", fname, loader)
File "/Users/guido/p/Lib/runpy.py", line 34, in _run_code
exec code in run_globals
File "/Users/guido/p/Lib/test/foo.py", line 1, in <module>
from . import test_support
ValueError: Attempted relative import in non-package
$
What's missing here?
----------
assignee: gvanrossum -> ncoghlan
resolution: -> accepted
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1487>
__________________________________
More information about the Python-bugs-list
mailing list