A simple virtual package could be:

# foo.py
__path__ = [__file__ + ".d"]

But unfortunately this doesn't work with -m:

# foo.py.d/__main__.py
print("this will never run")

(n.b. -m foo.__main__ works but nobody's writing that.)

Is it possible to change this backwards-compatibly? If not, is it possible to document it slightly better?

Thanks.
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/AAE7CRMOVAUKVBH2U3RWTBV32HQIDWVF/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to