parameters: ()
return_statement: return False
docstring: Return True if Cython or Pyrex can be imported.
docstring_summary: Return True if Cython or Pyrex can be imported.
docstring_tokens: Return True if Cython or Pyrex can be imported .
function: def have_pyrex():
      """
      Return True if Cython or Pyrex can be imported.
      """
      pyrex_impls = 'Cython.Distutils.build_ext', 'Pyrex.Distutils.build_ext'
      for pyrex_impl in pyrex_impls:
          try:
              # from (pyrex_impl) import build_ext
              __import__(pyrex_impl, fromlist=['build_ext']).build_ext
              return True
          except Exception:
              pass
      return False
function_tokens: def have_pyrex ( ) : pyrex_impls = 'Cython.Distutils.build_ext' , 'Pyrex.Distutils.build_ext' for pyrex_impl in pyrex_impls : try : # from (pyrex_impl) import build_ext __import__ ( pyrex_impl , fromlist = [ 'build_ext' ] ) . build_ext return True except Exception : pass return False