简体   繁体   中英

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM