| From: Dave Collier-Brown via talk <[email protected]>
| In a life long ago, we'd have made /usr/bin/python a shell script, containing
|
| echo "please run /usr/bin/python3"
Bikeshedding for fun:
#!/bin/sh
echo "$0: please use /usr/bin/python3 (or /usr/bin/python2 if you have
to)" >2
exit 42
(Untested, leaving scope for follow-ups.)
Didactic explanation of additions:
#!/bin/sh
make sure that the system runs this with the correct shell.
$0
include the name by which the script was invoked in the message
(or /usr/bin/python2 if you have to)
admit that there are laggards and help them too
>2
this should really go to standard error since it is an error
message
exit 42
the script should fail: things have gone awry.
42 was chosen to be slightly distinctive.
1 would be more conventional.
---
Post to this mailing list [email protected]
Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk