guesses the python verion of a source code file, printing "2" or "3"
$ 2or3 somecode.py
3
$ ispy3 somecode.py
3
$ echo $?
0
$ ispy2 somecode.py
3
$ echo $?
2
Writes a single byte to stdout (either "2" or "3") classifying a Python file using heuristics, giving priority to 3 if unclear
pip install 2or3==0.1.0
guesses the python verion of a source code file, printing "2" or "3"
$ 2or3 somecode.py
3
$ ispy3 somecode.py
3
$ echo $?
0
$ ispy2 somecode.py
3
$ echo $?
2