The messy details of actual embedding python in the jvm, aside from interpreter state, go here. Don't expect a pleasant ride. If you want to create a new python type or function, something that requires knowledge of the C structures behind everything that knowledge should be encoded in this file.
The messy details of actual embedding python in the jvm, aside from interpreter state, go here. Don't expect a pleasant ride. If you want to create a new python type or function, something that requires knowledge of the C structures behind everything that knowledge should be encoded in this file.
(create-var-writer writer-var)
Returns an unregistered bridge
Returns an unregistered bridge
(expose-bridge-to-python! bridge & [libpython-module])
Create a python object for this bridge.
Create a python object for this bridge.
(method-def-data-seq->method-def-ref method-def-data-seq)
(register-bridge-type! &
{:keys [type-name module] :or {type-name "jvm_bridge"}})
Register the bridge type and return newly created type.
Register the bridge type and return newly created type.
(register-type! module
{:keys [type-name docstring method-definitions tp_flags
tp_basicsize tp_new tp_dealloc tp_getattr tp_setattr]
:as type-definition})
Register a new type. Please refer to python documentation for meaning of the variables.
Register a new type. Please refer to python documentation for meaning of the variables.
(run-simple-string program & {:keys [globals locals]})
Run a simple string returning boolean 1 or 0. Implemented in cpython as:
PyObject *m, *d, *v; m = PyImport_AddModule("main"); if (m == NULL) return -1; d = PyModule_GetDict(m); v = PyRun_StringFlags(command, Py_file_input, d, d, flags); if (v == NULL) { PyErr_Print(); return -1; } Py_DECREF(v); return 0;
Run a simple string returning boolean 1 or 0. Implemented in cpython as: PyObject *m, *d, *v; m = PyImport_AddModule("__main__"); if (m == NULL) return -1; d = PyModule_GetDict(m); v = PyRun_StringFlags(command, Py_file_input, d, d, flags); if (v == NULL) { PyErr_Print(); return -1; } Py_DECREF(v); return 0;
(run-string program & {:keys [globals locals]})
If you don't know what you are doing, this will sink you. See documentation for run-simple-string.
If you don't know what you are doing, this will sink you. See documentation for run-simple-string.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close