|
|
|
|
|
by Someone
733 days ago
|
|
> but then you have to add a shebang line directly to the script itself, which I always feel uncomfortable since it's hard-coded It won’t directly help reach your goal, but it is semi hard-coded. The ‘correct’ (but see https://unix.stackexchange.com/a/29620 for some caveats) way to write a shebang line is #!/usr/bin/env python
That will make it run the first python in your path.> what if in future I don't want to execute my .py script with `/usr/bin/python` but `/usr/bin/nohtyp`?). You could create a symlink called python to /usr/bin/nohtyp on your system in a directory that’s searched before /usr/bin (e.g. by adding ~/myCommandPreferences to the front of your PATH) |
|