Oct-09-2016, 09:00 AM
i would like to have a python script that, given the path to another script, will indicate if there is a reason that other script would need to be run under python 3 instead of python 2. it should have a quiet option that also causes it to exit with an exit status value of 2 for scripts that need to run in python 2. if there is a slash-bang and it runs python 2 or 3 explicitly then it should presume that is the version it needs. if the slash-bang does not specify an explicit (e.g "python" with no version given in the name) version then it should look further on for clues. things like usage of "long" or "xrange" (in real code, not in comments, string literals. or as part of other identifiers) indicate a need for python 2.
sounds like a big project to me. i have built a little system to run python scripts with an explicit interpreter but i want it to know if version 2 is needed or use version 3 by default. i want to add a means like this to figure it out.
sounds like a big project to me. i have built a little system to run python scripts with an explicit interpreter but i want it to know if version 2 is needed or use version 3 by default. i want to add a means like this to figure it out.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.