"python" may point to nothing (most probable), python2 or python3 (least probable)
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 13.6k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
From https://github.com/openwall/john/pull/4898#issuecomment-2960241126 on:
Me:
Um, what is the current "correct" way of calling python? Shebangs like
#!/usr/bin/env pythondoesn't work on Ubuntu (at least not my 24.04) but some of our tools (and this one) use that, while others use#!/usr/bin/env python3and a couple even has#!/usr/bin/env python2.
Solar:
Our conversion was to use
#!/usr/bin/env pythonfor scripts that work with either Python 2 or 3,#!/usr/bin/env python3for scripts that are Python 3 only, and#!/usr/bin/env python2for scripts that are Python 2 only. Unfortunately, it looks like our convention for universal script is detached from distro reality.If so, I suggest we convert them to use
#!/usr/bin/env python3because a modern distro is unlikely to have anything else available by default, but add a comment just below saying that the script also works with Python 2.This is especially important and unfortunate for
bitcoin2john.py, which supports both versions of Python but is easier to get working with Python 2 (BDB bundled) than 3. So we may want to put a more elaborate comment into that one script.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the Python script shebangs, especially bitcoin2john.py, against the stated Python 2 and Python 3 compatibility convention. Determine which scripts need updated interpreter names and where compatibility comments are required. Done means the script entry points use a working modern-distro invocation while preserving the documented compatibility guidance.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100