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
-
.active_session?(token : SessionToken) : Bool
Check if the current session is active
-
.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 and return the result as PyObject.
- .eval_preview(code : String) : String
-
.exec(code : String) : Nil
Execute Python statements with error handling.
-
.extract_python_error : String | Nil
Helper method to extract Python error information
-
.finalize
Finalize Crython logical session
- .import(name : String) : PyObject
- .import?(name : String) : PyObject | Nil
-
.init
Initialize a Python interpreter
-
.initialized? : Bool
Check if Crython logical session is initialized
-
.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)
- .sealed_session?(token : SessionToken) : Bool
-
.session(&)
Embed Python execution
- .session_token : SessionToken
- .slice_full : PyObject
- .with_gil(&)
Class Method Detail
Check if the current session is active
Evaluate a Python expression and return the result as PyObject.
Helper method to extract Python error information
def self.none_newref : LibPython::PyObject
#
Get a new reference to Python None without using varargs APIs.