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.
comments powered by Disqus