module Crython
Defined in:
crython.crcrython/env.cr
crython/error.cr
crython/libpython.cr
crython/libpython/abstract.cr
crython/libpython/boolobject.cr
crython/libpython/ceval.cr
crython/libpython/complexobject.cr
crython/libpython/dictobject.cr
crython/libpython/floatobject.cr
crython/libpython/import.cr
crython/libpython/listobject.cr
crython/libpython/longobject.cr
crython/libpython/modsupport.cr
crython/libpython/pyerrors.cr
crython/libpython/pylifecycle.cr
crython/libpython/pystate.cr
crython/libpython/pythonrun.cr
crython/libpython/refcount.cr
crython/libpython/setobject.cr
crython/libpython/sliceobject.cr
crython/libpython/tupleobject.cr
crython/libpython/unicodeobject.cr
crython/py2cr/basic.cr
crython/py2cr/collections.cr
crython/pyobject.cr
crython/pyobject/object_protocol.cr
crython/version.cr
Constant Summary
-
PY_EVAL_INPUT =
258 -
PY_FILE_INPUT =
257 -
PY_SINGLE_INPUT =
256 -
VERSION =
{{ (`shards version /home/runner/work/crython/crython/src/crython`).chomp.stringify }}
Class Method Summary
-
.capture_python_error : PythonErrorInfo | Nil
Capture and clear the current Python exception while the GIL is held.
-
.clear_error
Clear the current Python error state
- .debug_enabled? : Bool
- .debug_log(message : String) : Nil
-
.err_occurred? : Bool
Whether the Python interpreter raised an error.
-
.eval(code : String) : PyObject
Evaluate a Python expression in the shared main namespace.
- .eval_preview(code : String) : String
-
.exec(code : String) : Nil
Execute Python statements in the shared main namespace.
- .extract_python_error : String | Nil
- .import(name : String) : PyObject
- .import?(name : String) : PyObject | Nil
-
.init(python_executable : String | Nil = nil) : Nil
Initialize CPython once for this process.
-
.initialized? : Bool
Whether the Crython-managed CPython runtime is available.
-
.none_newref : LibPython::PyObject
Get a new reference to Python None without using varargs APIs.
- .python_build_info : String
- .python_compiler : String
-
.python_version : String
Python environment information (cached)
- .slice_full : PyObject
-
.with_gil(&)
Crython currently supports only the OS thread that initialized CPython.
Class Method Detail
Capture and clear the current Python exception while the GIL is held.
Evaluate a Python expression in the shared main namespace.
Execute Python statements in the shared main namespace.
Initialize CPython once for this process. Attaching to an interpreter initialized by another library is deliberately unsupported.
Whether the Crython-managed CPython runtime is available.
Get a new reference to Python None without using varargs APIs.