Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/thomasballinger/2or3

Uses heuristics to classify a Python file as Python 2 or 3. Prefers 3 if unclear.
https://github.com/thomasballinger/2or3

Last synced: 20 days ago
JSON representation

Uses heuristics to classify a Python file as Python 2 or 3. Prefers 3 if unclear.

Awesome Lists containing this project

README

        

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