delph-in / pydelphin

Python libraries for DELPH-IN
https://pydelphin.readthedocs.io/
MIT License
77 stars 27 forks source link

Use the more standard __main__.py instead of main.py #375

Closed goodmami closed 8 months ago

goodmami commented 8 months ago

I didn't know originally that __main__.py is a standard thing in Python, and called the module main.py. This means that the following doesn't work:

$ python -m delphin
[...]: No module named delphin.__main__; 'delphin' is a package and cannot be directly executed

Instead, the following is necessary:

$ python -m delphin.main
usage: delphin [-h] [-V]  ...
[...]

In practice this is not a big deal because installing PyDelphin makes the delphin command available, but it's good to follow best-practices.