def is_python_27():
 (major_version, minor_version) = sys.version_info[0:2]
 return ((major_version > 2) or ((major_version == 2) and (minor_version >= 7)))

def is_python_27 ( ) : ( major_version , minor_version ) = sys . version_info [ 0 : 2 ] return ( ( major_version > 2 ) or ( ( major_version == 2 ) and ( minor_version >= 7 ) ) )
checks if were running python 2 .