python

package
v2.9.5+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 31, 2021 License: MPL-2.0 Imports: 13 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindPythonConfig

func FindPythonConfig(customVersion string) (selectedVersion string, err error)

FindPythonConfig scans PATH for common python-config locations.

func GetItem

func GetItem(d unsafe.Pointer, k string) (unsafe.Pointer, error)

GetItem wraps PyDict_GetItemString

func Init

func Init() error

Init will initialize the Python runtime.

func LoadModuleDict

func LoadModuleDict(m string) (unsafe.Pointer, error)

LoadModuleDict wraps PyModule_GetDict.

func PyBytesAsString

func PyBytesAsString(o unsafe.Pointer, l int) ([]byte, error)

PyBytesAsString wraps PyBytes_AsString

func PyBytesFromString

func PyBytesFromString(input []byte) (unsafe.Pointer, error)

PyBytesFromString wraps PyBytesFromString

func PyBytes_AsString

func PyBytes_AsString(arg0 *C.PyObject) *C.char

func PyBytes_FromStringAndSize

func PyBytes_FromStringAndSize(arg0 *C.char, arg1 C.long) *C.PyObject

func PyDecRef

func PyDecRef(o unsafe.Pointer)

func PyDict_GetItemString

func PyDict_GetItemString(dp *C.PyObject, key *C.char) *C.PyObject

func PyErr_Print

func PyErr_Print()

func PyEval_InitThreads

func PyEval_InitThreads()

func PyEval_SaveThread

func PyEval_SaveThread() *C.PyThreadState

func PyGILState_Ensure

func PyGILState_Ensure() C.PyGILState_STATE

func PyGILState_Release

func PyGILState_Release(arg0 C.PyGILState_STATE)

func PyImportImport

func PyImportImport(modulePtr unsafe.Pointer) unsafe.Pointer

func PyImport_Import

func PyImport_Import(name *C.PyObject) *C.PyObject

func PyIncRef

func PyIncRef(o unsafe.Pointer)

func PyLongAsLong

func PyLongAsLong(o unsafe.Pointer) int

PyLongAsLong wraps PyLong_AsLong

func PyLong_AsLong

func PyLong_AsLong(arg0 *C.PyObject) C.long

func PyModule_GetDict

func PyModule_GetDict(arg0 *C.PyObject) *C.PyObject

func PyObjectCallObject

func PyObjectCallObject(o unsafe.Pointer, args unsafe.Pointer) (unsafe.Pointer, error)

PyObjectCallObject wraps PyObject_CallObject

func PyObjectGetAttr

func PyObjectGetAttr(o unsafe.Pointer, attr interface{}) (unsafe.Pointer, error)

PyObjectGetAttr wraps PyObject_GetAttr

func PyObject_CallObject

func PyObject_CallObject(callable_object *C.PyObject, args *C.PyObject) *C.PyObject

func PyObject_GetAttr

func PyObject_GetAttr(arg0 *C.PyObject, arg1 *C.PyObject) *C.PyObject

func PyRunSimpleString

func PyRunSimpleString(s string)

PyRunSimpleString wraps PyRun_SimpleStringFlags

func PyRun_SimpleStringFlags

func PyRun_SimpleStringFlags(arg0 *C.char, arg1 unsafe.Pointer) C.int

func PyTupleClearFreeList

func PyTupleClearFreeList() int

func PyTupleGetItem

func PyTupleGetItem(tup unsafe.Pointer, pos int) (unsafe.Pointer, error)

PyTupleGetItem wraps PyTuple_GetItem

func PyTupleNew

func PyTupleNew(size int) (unsafe.Pointer, error)

PyTupleNew wraps PyTuple_New

func PyTupleSetItem

func PyTupleSetItem(tup unsafe.Pointer, pos int, o interface{}) error

PyTupleSetItem wraps PyTuple_SetItem

func PyTuple_ClearFreeList

func PyTuple_ClearFreeList() C.int

func PyTuple_GetItem

func PyTuple_GetItem(arg0 *C.PyObject, arg1 C.long) *C.PyObject

func PyTuple_New

func PyTuple_New(size C.long) *C.PyObject

func PyTuple_SetItem

func PyTuple_SetItem(arg0 *C.PyObject, arg1 C.long, arg2 *C.PyObject) C.int

func PyUnicodeFromString

func PyUnicodeFromString(s string) unsafe.Pointer

func PyUnicode_FromString

func PyUnicode_FromString(u *C.char) *C.PyObject

func Py_DecRef

func Py_DecRef(object *C.PyObject)

func Py_IncRef

func Py_IncRef(object *C.PyObject)

func Py_Initialize

func Py_Initialize()

func Py_IsInitialized

func Py_IsInitialized() C.int

func SetPythonPath

func SetPythonPath(p []string)

SetPythonPath is a helper for setting PYTHONPATH.

func ToPyObject

func ToPyObject(p unsafe.Pointer) *C.PyObject

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL