Author: bugman Date: Tue Oct 2 11:04:51 2012 New Revision: 17654 URL: http://svn.gna.org/viewcvs/relax?rev=17654&view=rev Log: The compat module now has the py_version variable specifying if this is Python 2 or 3. Modified: trunk/compat.py Modified: trunk/compat.py URL: http://svn.gna.org/viewcvs/relax/trunk/compat.py?rev=17654&r1=17653&r2=17654&view=diff ============================================================================== --- trunk/compat.py (original) +++ trunk/compat.py Tue Oct 2 11:04:51 2012 @@ -25,8 +25,11 @@ # Python module imports. import sys +# The Python version. +py_version = sys.version_info[0] + # Python 3 work-arounds. -if sys.version_info[0] == 3: +if py_version == 3: # Python 3 only imports. import builtins