Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
goodmami opened this issue Dec 9, 2023 · 0 comments
Closed

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

goodmami opened this issue Dec 9, 2023 · 0 comments
Labels
maintenance improving code quality; not features or bugs

Comments

@goodmami
Copy link
Member

goodmami commented Dec 9, 2023

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.

@goodmami goodmami added the maintenance improving code quality; not features or bugs label Dec 9, 2023
goodmami added a commit that referenced this issue Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance improving code quality; not features or bugs
Projects
None yet
Development

No branches or pull requests

1 participant