|
|
|
|
|
by jraph
733 days ago
|
|
> you have to add a shebang line directly to the script itself, which I always feel uncomfortable since it's hard-coded (what if in future I don't want to execute my .py script with `/usr/bin/python` but `/usr/bin/nohtyp`?). I believe the elegant solution to this is update-alternatives, which lets you tell the system which actual program to call. Maybe look into update-alternatives, I haven't looked into this much but it seems like it might interest you particularly. That's the closest equivalent to file association for the UNIX shell I would guess. You could also have a specific folder that you control in your PATH that symlinks to the Python you want to use. This handles the default, but you can still call your script with the program you want if you ever wish to bypass that. |
|