Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how can you tell if github repository is for python 2 or python 3

I'm interested in running this code from github – how do I know if it was written for python2 or python3?

I'm hoping this is a really basic question and there is just some part of the site which makes this obvious.

like image 845
jlansey Avatar asked Apr 01 '17 16:04

jlansey


1 Answers

You could download the source and run the 2to3 script to see if it proposes changes to upgrade it to python3:

https://docs.python.org/3/library/2to3.html

If there are no changes, then it is Python3 (and maybe also Python2) code.

like image 98
JulienD Avatar answered Oct 04 '22 13:10

JulienD