[issue39774] Missing documentation on how to make package executable as script

2021-04-12 Thread igo95862
Change by igo95862 : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue39774] Missing documentation on how to make package executable as script

2020-02-27 Thread Andrei Daraschenka
Change by Andrei Daraschenka : -- keywords: +patch nosy: +dorosch nosy_count: 3.0 -> 4.0 pull_requests: +18037 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18677 ___ Python tracker

[issue39774] Missing documentation on how to make package executable as script

2020-02-27 Thread Steven D'Aprano
Steven D'Aprano added the comment: You're right that it's hard to find any documentation on package `__main__.py` files. There's nothing here that I can see: https://docs.python.org/3/reference/import.html#packages Aside from the tutorial, the only other place I can find it referenced is a

[issue39774] Missing documentation on how to make package executable as script

2020-02-27 Thread igo95862
New submission from igo95862 : This is package documentation: https://docs.python.org/3/tutorial/modules.html#packages To make package executable (python -m package) you need to create a file __main__.py in the package directory. This is pretty much not documented anyone aside of trying t