serhii.net

In the middle of the desert you can say anything you want

23 Nov 2021

211123-2345 python packaging

Providing a __main__.py along with __init__.py makes the package itself executable:

$ python -m module_name

__main__.py would have an usual if __name__ == "__main__" block and run stuff imported from other files of that package.

Nel mezzo del deserto posso dire tutto quello che voglio.