def get_cython_version():
 import Cython.Compiler.Main
 match = re.search('^([0-9]+)\\.([0-9]+)', Cython.Compiler.Main.Version.version)
 try:
  return map(int, match.groups())
 except AttributeError:
  raise ImportError

def get_cython_version ( ) : import Cython . Compiler . Main match = re . search ( '^([0-9]+)\\.([0-9]+)' , Cython . Compiler . Main . Version . version ) try : return map ( int , match . groups ( ) ) except AttributeError : raise ImportError
returns: version as a pair of ints raises: importerror: cant load cython or find version .