Versions in this module Expand all Collapse all v0 v0.2.0 Jun 14, 2022 Changes in this version + const MaxVariadicLength + var Bool = togo((*C.PyObject)(unsafe.Pointer(&C.PyBool_Type))) + var ByteArray = togo((*C.PyObject)(unsafe.Pointer(&C.PyByteArray_Type))) + var Bytes = togo((*C.PyObject)(unsafe.Pointer(&C.PyBytes_Type))) + var Complex = togo((*C.PyObject)(unsafe.Pointer(&C.PyComplex_Type))) + var Dict = togo((*C.PyObject)(unsafe.Pointer(&C.PyDict_Type))) + var Float = togo((*C.PyObject)(unsafe.Pointer(&C.PyFloat_Type))) + var List = togo((*C.PyObject)(unsafe.Pointer(&C.PyList_Type))) + var Long = togo((*C.PyObject)(unsafe.Pointer(&C.PyLong_Type))) + var Module = togo((*C.PyObject)(unsafe.Pointer(&C.PyModule_Type))) + var PyExc_ArithmeticError = togo(C.PyExc_ArithmeticError) + var PyExc_AssertionError = togo(C.PyExc_AssertionError) + var PyExc_AttributeError = togo(C.PyExc_AttributeError) + var PyExc_BaseException = togo(C.PyExc_BaseException) + var PyExc_BlockingIOError = togo(C.PyExc_BlockingIOError) + var PyExc_BrokenPipeError = togo(C.PyExc_BrokenPipeError) + var PyExc_BufferError = togo(C.PyExc_BufferError) + var PyExc_BytesWarning = togo(C.PyExc_BytesWarning) + var PyExc_ChildProcessError = togo(C.PyExc_ChildProcessError) + var PyExc_ConnectcionResetError = togo(C.PyExc_ConnectionResetError) + var PyExc_ConnectionAbortedError = togo(C.PyExc_ConnectionAbortedError) + var PyExc_ConnectionError = togo(C.PyExc_ConnectionError) + var PyExc_ConnectionRefusedError = togo(C.PyExc_ConnectionRefusedError) + var PyExc_DeprecationWarning = togo(C.PyExc_DeprecationWarning) + var PyExc_EOFError = togo(C.PyExc_EOFError) + var PyExc_Exception = togo(C.PyExc_Exception) + var PyExc_FileExistsError = togo(C.PyExc_FileExistsError) + var PyExc_FileNotFoundError = togo(C.PyExc_FileNotFoundError) + var PyExc_FloatingPointError = togo(C.PyExc_FloatingPointError) + var PyExc_FutureWarning = togo(C.PyExc_FutureWarning) + var PyExc_GeneratorExit = togo(C.PyExc_GeneratorExit) + var PyExc_ImportError = togo(C.PyExc_ImportError) + var PyExc_ImportWarning = togo(C.PyExc_ImportWarning) + var PyExc_IndentationError = togo(C.PyExc_IndentationError) + var PyExc_IndexError = togo(C.PyExc_IndexError) + var PyExc_InterruptedError = togo(C.PyExc_InterruptedError) + var PyExc_IsADirectoryError = togo(C.PyExc_IsADirectoryError) + var PyExc_KeyError = togo(C.PyExc_KeyError) + var PyExc_KeyboardInterrupt = togo(C.PyExc_KeyboardInterrupt) + var PyExc_LookupError = togo(C.PyExc_LookupError) + var PyExc_MemoryError = togo(C.PyExc_MemoryError) + var PyExc_ModuleNotFoundError = togo(C.PyExc_ModuleNotFoundError) + var PyExc_NameError = togo(C.PyExc_NameError) + var PyExc_NotADirectoryError = togo(C.PyExc_NotADirectoryError) + var PyExc_NotImplementedError = togo(C.PyExc_NotImplementedError) + var PyExc_OSError = togo(C.PyExc_OSError) + var PyExc_OverflowError = togo(C.PyExc_OverflowError) + var PyExc_PendingDeprecationWarning = togo(C.PyExc_PendingDeprecationWarning) + var PyExc_PermissionError = togo(C.PyExc_PermissionError) + var PyExc_ProcessLookupError = togo(C.PyExc_ProcessLookupError) + var PyExc_RecursionError = togo(C.PyExc_RecursionError) + var PyExc_ReferenceError = togo(C.PyExc_ReferenceError) + var PyExc_ResourceWarning = togo(C.PyExc_ResourceWarning) + var PyExc_RuntimeError = togo(C.PyExc_RuntimeError) + var PyExc_RuntimeWarning = togo(C.PyExc_RuntimeWarning) + var PyExc_StopAsyncIteration = togo(C.PyExc_StopAsyncIteration) + var PyExc_StopIteration = togo(C.PyExc_StopIteration) + var PyExc_SyntaxError = togo(C.PyExc_SyntaxError) + var PyExc_SyntaxWarning = togo(C.PyExc_SyntaxWarning) + var PyExc_SystemError = togo(C.PyExc_SystemError) + var PyExc_SystemExit = togo(C.PyExc_SystemExit) + var PyExc_TabError = togo(C.PyExc_TabError) + var PyExc_TimeoutError = togo(C.PyExc_TimeoutError) + var PyExc_TypeError = togo(C.PyExc_TypeError) + var PyExc_UnboundLocalError = togo(C.PyExc_UnboundLocalError) + var PyExc_UnicodeDecodeError = togo(C.PyExc_UnicodeDecodeError) + var PyExc_UnicodeEncodeError = togo(C.PyExc_UnicodeEncodeError) + var PyExc_UnicodeError = togo(C.PyExc_UnicodeError) + var PyExc_UnicodeTranslateError = togo(C.PyExc_UnicodeTranslateError) + var PyExc_UnicodeWarning = togo(C.PyExc_UnicodeWarning) + var PyExc_UserWarning = togo(C.PyExc_UserWarning) + var PyExc_ValueError = togo(C.PyExc_ValueError) + var PyExc_Warning = togo(C.PyExc_Warning) + var PyExc_ZeroDivisionError = togo(C.PyExc_ZeroDivisionError) + var Py_EQ = int(C.Py_EQ) + var Py_False = togo(C.Py_False) + var Py_GE = int(C.Py_GE) + var Py_GT = int(C.Py_GT) + var Py_LE = int(C.Py_LE) + var Py_LT = int(C.Py_LT) + var Py_NE = int(C.Py_NE) + var Py_None = togo(C.Py_None) + var Py_True = togo(C.Py_True) + var Tuple = togo((*C.PyObject)(unsafe.Pointer(&C.PyTuple_Type))) + var Type = togo((*C.PyObject)(unsafe.Pointer(&C.PyType_Type))) + var Unicode = togo((*C.PyObject)(unsafe.Pointer(&C.PyUnicode_Type))) + func PyBool_Check(o *PyObject) bool + func PyByteArray_AsString(o *PyObject) string + func PyByteArray_Check(o *PyObject) bool + func PyByteArray_CheckExact(o *PyObject) bool + func PyByteArray_Resize(bytearray *PyObject, len int) + func PyByteArray_Size(o *PyObject) int + func PyBytes_AsString(o *PyObject) string + func PyBytes_Check(o *PyObject) bool + func PyBytes_CheckExact(o *PyObject) bool + func PyBytes_Size(o *PyObject) int + func PyCallable_Check(o *PyObject) bool + func PyComplex_Check(p *PyObject) bool + func PyComplex_CheckExact(p *PyObject) bool + func PyComplex_ImagAsDouble(op *PyObject) float64 + func PyComplex_RealAsDouble(op *PyObject) float64 + func PyDict_Check(p *PyObject) bool + func PyDict_CheckExact(p *PyObject) bool + func PyDict_Clear(p *PyObject) + func PyDict_ClearFreeList() int + func PyDict_Contains(p, key *PyObject) int + func PyDict_DelItem(p, key *PyObject) int + func PyDict_DelItemString(p *PyObject, key string) int + func PyDict_Next(p *PyObject, ppos *int, pkey, pvalue **PyObject) bool + func PyDict_SetItem(p, key, val *PyObject) int + func PyDict_SetItemString(p *PyObject, key string, val *PyObject) int + func PyDict_Size(p *PyObject) int + func PyErr_BadArgument() + func PyErr_BadInternalCall() + func PyErr_CheckSignals() int + func PyErr_Clear() + func PyErr_ExceptionMatches(exc *PyObject) bool + func PyErr_Fetch() (*PyObject, *PyObject, *PyObject) + func PyErr_GetExcInfo() (*PyObject, *PyObject, *PyObject) + func PyErr_GivenExceptionMatches(given, exc *PyObject) bool + func PyErr_NormalizeException(exc, val, tb *PyObject) (*PyObject, *PyObject, *PyObject) + func PyErr_Print() + func PyErr_PrintEx(setSysLastVars bool) + func PyErr_Restore(pyType *PyObject, value *PyObject, traceback *PyObject) + func PyErr_SetExcInfo(pyType *PyObject, value *PyObject, traceback *PyObject) + func PyErr_SetInterrupt() + func PyErr_SetNone(pyType *PyObject) + func PyErr_SetObject(pyType, value *PyObject) + func PyErr_SetString(pyType *PyObject, message string) + func PyErr_SyntaxLocation(filename string, lineno int) + func PyErr_SyntaxLocationEx(filename string, lineno, col_offset int) + func PyErr_SyntaxLocationObject(filename *PyObject, lineno, col_offset int) + func PyErr_WarnEx(category *PyObject, message string, stack_level int) int + func PyErr_WarnExplicit(category *PyObject, message string, filename string, lineno int, module string, ...) int + func PyErr_WarnExplicitObject(category *PyObject, message *PyObject, filename *PyObject, lineno int, ...) int + func PyErr_WriteUnraisable(obj *PyObject) + func PyEval_GetFuncDesc(pyFunc *PyObject) string + func PyEval_GetFuncName(pyFunc *PyObject) string + func PyEval_InitThreads() + func PyEval_ReInitThreads() + func PyEval_RestoreThread(tstate *PyThreadState) + func PyEval_ThreadsInitialized() bool + func PyException_SetCause(ex, cause *PyObject) + func PyException_SetContext(ex, ctx *PyObject) + func PyException_SetTraceback(ex, tb *PyObject) int + func PyFloat_AsDouble(obj *PyObject) float64 + func PyFloat_Check(p *PyObject) bool + func PyFloat_CheckExact(p *PyObject) bool + func PyFloat_ClearFreeList() int + func PyFloat_GetMax() float64 + func PyFloat_GetMin() float64 + func PyGILState_Check() bool + func PyGILState_Release(state PyGILState) + func PyImport_GetMagicNumber() int + func PyImport_GetMagicTag() string + func PyImport_ImportFrozenModule(name string) int + func PyImport_ImportFrozenModuleObject(name *PyObject) int + func PyList_Append(p, item *PyObject) int + func PyList_Check(p *PyObject) bool + func PyList_CheckExact(p *PyObject) bool + func PyList_ClearFreeList() int + func PyList_Insert(p *PyObject, index int, item *PyObject) int + func PyList_Reverse(list *PyObject) int + func PyList_SetItem(p *PyObject, pos int, o *PyObject) int + func PyList_SetSlice(p *PyObject, low, high int, itemlist *PyObject) int + func PyList_Size(p *PyObject) int + func PyList_Sort(list *PyObject) int + func PyLong_AsDouble(obj *PyObject) float64 + func PyLong_AsLong(obj *PyObject) int + func PyLong_AsLongAndOverflow(obj *PyObject) (int, int) + func PyLong_AsLongLong(obj *PyObject) int64 + func PyLong_AsLongLongAndOverflow(obj *PyObject) (int64, int) + func PyLong_AsUnsignedLong(obj *PyObject) uint + func PyLong_AsUnsignedLongLong(obj *PyObject) uint64 + func PyLong_AsUnsignedLongLongMask(obj *PyObject) uint64 + func PyLong_AsUnsignedLongMask(obj *PyObject) uint + func PyLong_Check(p *PyObject) bool + func PyLong_CheckExact(p *PyObject) bool + func PyModule_Check(p *PyObject) bool + func PyModule_CheckExact(p *PyObject) bool + func PyModule_GetName(module *PyObject) string + func PyModule_GetState(module *PyObject) unsafe.Pointer + func PyRun_AnyFile(filename string) (int, error) + func PyRun_SimpleString(command string) int + func PySignal_SetWakeupFd(fd uintptr) uintptr — darwin/amd64, js/wasm, linux/amd64 + func PySys_AddWarnOption(s string) error + func PySys_AddXOption(s string) error + func PySys_ResetWarnOptions() + func PySys_SetArgv(args []string) error + func PySys_SetArgvEx(args []string, updatepath bool) error + func PySys_SetObject(name string, v *PyObject) int + func PySys_SetPath(path string) error + func PyTuple_Check(p *PyObject) bool + func PyTuple_CheckExact(p *PyObject) bool + func PyTuple_SetItem(p *PyObject, pos int, o *PyObject) int + func PyTuple_Size(p *PyObject) int + func PyType_Check(o *PyObject) bool + func PyType_CheckExact(o *PyObject) bool + func PyUnicode_AsUTF8(unicode *PyObject) string + func PyUnicode_Check(o *PyObject) bool + func PyUnicode_CheckExact(o *PyObject) bool + func PyUnicode_CopyCharacters(to, from *PyObject, to_start, from_start, how_many int) int + func PyUnicode_Fill(unicode *PyObject, start, length int, fill_char rune) int + func PyUnicode_GetLength(unicode *PyObject) int + func PyUnicode_ReadChar(unicode *PyObject, index int) rune + func PyUnicode_WriteChar(unicode *PyObject, index int, character rune) int + func Py_EnterRecursiveCall(where string) int + func Py_Finalize() + func Py_FinalizeEx() int + func Py_GetBuildInfo() string + func Py_GetCompiler() string + func Py_GetCopyright() string + func Py_GetExecPrefix() (string, error) + func Py_GetPath() (string, error) + func Py_GetPlatform() string + func Py_GetPrefix() (string, error) + func Py_GetProgramFullPath() (string, error) + func Py_GetProgramName() (string, error) + func Py_GetPythonHome() (string, error) + func Py_GetVersion() string + func Py_Initialize() + func Py_InitializeEx(initsigs bool) + func Py_IsInitialized() bool + func Py_LeaveRecursiveCall() + func Py_Main(args []string) (int, error) + func Py_SetPath(path string) error + func Py_SetProgramName(name string) error + func Py_SetPythonHome(home string) error + func Py_SetStandardStreamEncoding(encoding, errors string) int + type PyGILState C.PyGILState_STATE + func PyGILState_Ensure() PyGILState + type PyObject C.PyObject + func PyBool_FromLong(v int) *PyObject + func PyByteArray_Concat(a, b *PyObject) *PyObject + func PyByteArray_FromObject(o *PyObject) *PyObject + func PyByteArray_FromStringAndSize(str string) *PyObject + func PyBytes_Concat(bytes, newpart *PyObject) *PyObject + func PyBytes_ConcatAndDel(bytes, newpart *PyObject) *PyObject + func PyBytes_FromObject(o *PyObject) *PyObject + func PyBytes_FromString(str string) *PyObject + func PyComplex_FromDoubles(real, imag float64) *PyObject + func PyDictProxy_New(mapping *PyObject) *PyObject + func PyDict_Copy(p *PyObject) *PyObject + func PyDict_GetItem(p, key *PyObject) *PyObject + func PyDict_GetItemString(p *PyObject, key string) *PyObject + func PyDict_GetItemWithError(p, key *PyObject) *PyObject + func PyDict_Items(p *PyObject) *PyObject + func PyDict_Keys(p *PyObject) *PyObject + func PyDict_New() *PyObject + func PyDict_SetDefault(p, key, pyDefault *PyObject) *PyObject + func PyDict_Values(p *PyObject) *PyObject + func PyErr_NewException(name string, base, dict *PyObject) *PyObject + func PyErr_NewExceptionWithDoc(name, doc string, base, dict *PyObject) *PyObject + func PyErr_NoMemory() *PyObject + func PyErr_Occurred() *PyObject + func PyErr_SetImportError(msg, name, path *PyObject) *PyObject + func PyErr_SetImportErrorSubclass(msg, name, path, subclass *PyObject) *PyObject + func PyEval_GetBuiltins() *PyObject + func PyEval_GetGlobals() *PyObject + func PyEval_GetLocals() *PyObject + func PyException_GetCause(ex *PyObject) *PyObject + func PyException_GetContext(ex *PyObject) *PyObject + func PyException_GetTraceback(ex *PyObject) *PyObject + func PyFloat_FromDouble(v float64) *PyObject + func PyFloat_FromString(str *PyObject) *PyObject + func PyFloat_GetInfo() *PyObject + func PyImport_AddModule(name string) *PyObject + func PyImport_AddModuleObject(name *PyObject) *PyObject + func PyImport_ExecCodeModule(name string, co *PyObject) *PyObject + func PyImport_ExecCodeModuleEx(name string, co *PyObject, pathname string) *PyObject + func PyImport_ExecCodeModuleObject(name, co, pathname, cpathname *PyObject) *PyObject + func PyImport_ExecCodeModuleWithPathnames(name string, co *PyObject, pathname string, cpathname string) *PyObject + func PyImport_GetImporter(path *PyObject) *PyObject + func PyImport_GetModule(name *PyObject) *PyObject + func PyImport_GetModuleDict() *PyObject + func PyImport_Import(name *PyObject) *PyObject + func PyImport_ImportModule(name string) *PyObject + func PyImport_ImportModuleEx(name string, globals, locals, fromlist *PyObject) *PyObject + func PyImport_ImportModuleLevel(name string, globals, locals, fromlist *PyObject, level int) *PyObject + func PyImport_ImportModuleLevelObject(name, globals, locals, fromlist *PyObject, level int) *PyObject + func PyImport_ReloadModule(name *PyObject) *PyObject + func PyList_AsTuple(list *PyObject) *PyObject + func PyList_GetItem(p *PyObject, pos int) *PyObject + func PyList_GetSlice(p *PyObject, low, high int) *PyObject + func PyList_New(len int) *PyObject + func PyLong_FromDouble(v float64) *PyObject + func PyLong_FromGoFloat64(v float64) *PyObject + func PyLong_FromGoInt(v int) *PyObject + func PyLong_FromGoInt64(v int64) *PyObject + func PyLong_FromGoUint(v uint) *PyObject + func PyLong_FromGoUint64(v uint64) *PyObject + func PyLong_FromLong(v int) *PyObject + func PyLong_FromLongLong(v int64) *PyObject + func PyLong_FromString(str string, base int) *PyObject + func PyLong_FromUnicodeObject(u *PyObject, base int) *PyObject + func PyLong_FromUnsignedLong(v uint) *PyObject + func PyLong_FromUnsignedLongLong(v uint64) *PyObject + func PyModule_GetDict(module *PyObject) *PyObject + func PyModule_GetFilenameObject(module *PyObject) *PyObject + func PyModule_GetNameObject(module *PyObject) *PyObject + func PyModule_New(name string) *PyObject + func PyModule_NewObject(name *PyObject) *PyObject + func PySys_GetObject(name string) *PyObject + func PySys_GetXOptions() *PyObject + func PyTuple_GetItem(p *PyObject, pos int) *PyObject + func PyTuple_GetSlice(p *PyObject, low, high int) *PyObject + func PyTuple_New(len int) *PyObject + func PyUnicode_FromEncodedObject(obj *PyObject, encoding, errors string) *PyObject + func PyUnicode_FromString(u string) *PyObject + func PyUnicode_New(size int, maxchar rune) *PyObject + func PyUnicode_Substring(unicode *PyObject, start, end int) *PyObject + func (pyObject *PyObject) ASCII() *PyObject + func (pyObject *PyObject) Bytes() *PyObject + func (pyObject *PyObject) Call(args *PyObject, kwargs *PyObject) *PyObject + func (pyObject *PyObject) CallFunctionObjArgs(args ...*PyObject) *PyObject + func (pyObject *PyObject) CallMethodArgs(name string, args ...*PyObject) *PyObject + func (pyObject *PyObject) CallMethodObjArgs(name *PyObject, args ...*PyObject) *PyObject + func (pyObject *PyObject) CallObject(args *PyObject) *PyObject + func (pyObject *PyObject) DecRef() + func (pyObject *PyObject) DelAttr(attr_name *PyObject) int + func (pyObject *PyObject) DelAttrString(attr_name string) int + func (pyObject *PyObject) DelItem(key *PyObject) int + func (pyObject *PyObject) Dir() *PyObject + func (pyObject *PyObject) GetAttr(attr_name *PyObject) *PyObject + func (pyObject *PyObject) GetAttrString(attr_name string) *PyObject + func (pyObject *PyObject) GetItem(key *PyObject) *PyObject + func (pyObject *PyObject) GetIter() *PyObject + func (pyObject *PyObject) HasAttr(attr_name *PyObject) bool + func (pyObject *PyObject) HasAttrString(attr_name string) bool + func (pyObject *PyObject) Hash() int + func (pyObject *PyObject) HashNotImplemented() int + func (pyObject *PyObject) IncRef() + func (pyObject *PyObject) IsInstance(cls *PyObject) int + func (pyObject *PyObject) IsSubclass(cls *PyObject) int + func (pyObject *PyObject) IsTrue() int + func (pyObject *PyObject) Length() int + func (pyObject *PyObject) LengthHint(pyDefault int) int + func (pyObject *PyObject) Not() int + func (pyObject *PyObject) Repr() *PyObject + func (pyObject *PyObject) ReprEnter() int + func (pyObject *PyObject) ReprLeave() + func (pyObject *PyObject) RichCompare(o *PyObject, opid int) *PyObject + func (pyObject *PyObject) RichCompareBool(o *PyObject, opid int) int + func (pyObject *PyObject) SetAttr(attr_name *PyObject, v *PyObject) int + func (pyObject *PyObject) SetAttrString(attr_name string, v *PyObject) int + func (pyObject *PyObject) SetItem(key, v *PyObject) int + func (pyObject *PyObject) Str() *PyObject + func (pyObject *PyObject) Type() *PyObject + type PyThreadState C.PyThreadState + func PyEval_SaveThread() *PyThreadState + func PyGILState_GetThisThreadState() *PyThreadState + func PyThreadState_Get() *PyThreadState + func PyThreadState_Swap(tstate *PyThreadState) *PyThreadState