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

Added hashbang #100

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Added hashbang #100

wants to merge 1 commit into from

Conversation

denilsonsa
Copy link

This allows directly calling the script as executable under any Unix-like system.

This allows directly calling the script as executable under any Unix-like system.
@Kalanyr
Copy link
Owner

Kalanyr commented Jan 22, 2024 via email

@Kalanyr
Copy link
Owner

Kalanyr commented Jan 22, 2024 via email

@denilsonsa
Copy link
Author

py version management command on Windows

What is that? Why is that? I never heard of it, but also I never wrote Python code under Windows anyway.


As a side note, you may want to drop Python 2.x support (it's been four years since it ended official support, and over a decade since Python 3.x was available). It can potentially simplify some code.

And, after that, you could write a pyproject.toml file, to make this repository a proper Python package (even if you don't plan on publishing it on PyPI). This way, it can be easily installed together with all the dependencies using pip.

Going pyproject.toml is the easiest solution regarding creating a separate module and then a launcher script, as it's natively supported as Entry points.

@Kalanyr
Copy link
Owner

Kalanyr commented Jan 22, 2024 via email

@denilsonsa
Copy link
Author

I see, it's mentioned in the official docs. I know it is also possible to use git smudge and clean filters to automatically modify files before committing. This way it would be possible to keep a local shebang different from what is stored in the repository.

Anyway, if it's too troublesome, feel free to close this. I know I can add the shebang myself on my local copy. (Although running it first without a shebang tries to run the script as a shell script, and bad stuff happens.)

Oh, I just noticed this PR tries to fix #65.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants