Created
May 4, 2017 15:14
-
-
Save elconde/de36a81a7bbbabeb331b9d4e399a4669 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import re | |
| def uses_python_26(path): | |
| """Does this path need 2.6?""" | |
| match = re.search('20[0-9][0-9]', path) | |
| assert match, 'Could not figure out Python version' | |
| return int(match.group(0)) < 2016 | |
| print uses_python_26(r'C:\Program Files\FRONT\FRONT ARENA\PRIME\2014.4') | |
| print uses_python_26(r'C:\Program Files\FRONT\FRONT ARENA\PRIME\2016.4') | |
| print uses_python_26(r'C:\Program Files\FRONT\FRONT ARENA\PRIME\2017.1') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment