-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
From #4898 (comment) on:
Me:
Um, what is the current "correct" way of calling python? Shebangs like
#!/usr/bin/env python
doesn'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 python3
and a couple even has#!/usr/bin/env python2
.
Solar:
Our conversion was to use
#!/usr/bin/env python
for scripts that work with either Python 2 or 3,#!/usr/bin/env python3
for scripts that are Python 3 only, and#!/usr/bin/env python2
for 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 python3
because 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.