Doc files for nimpy

py_lib

py_lib

Types

PyLib = ref object
  module*: LibHandle
  Py_BuildValue*: proc (f: cstring): PPyObject {...}{.cdecl, varargs.}
  PyTuple_New*: proc (sz: Py_ssize_t): PPyObject {...}{.cdecl.}
  PyTuple_Size*: proc (f: PPyObject): Py_ssize_t {...}{.cdecl.}
  PyTuple_GetItem*: proc (f: PPyObject; i: Py_ssize_t): PPyObject {...}{.cdecl.}
  PyTuple_SetItem*: proc (f: PPyObject; i: Py_ssize_t; v: PPyObject): cint {...}{.cdecl.}
  Py_None*: PPyObject
  PyType_Ready*: proc (f: PyTypeObject): cint {...}{.cdecl.}
  PyType_GenericNew*: proc (f: PyTypeObject; a, b: PPyObject): PPyObject {...}{.cdecl.}
  PyModule_AddObject*: proc (m: PPyObject; n: cstring; o: PPyObject): cint {...}{.cdecl.}
  PyList_New*: proc (size: Py_ssize_t): PPyObject {...}{.cdecl.}
  PyList_Size*: proc (l: PPyObject): Py_ssize_t {...}{.cdecl.}
  PyList_GetItem*: proc (l: PPyObject; index: Py_ssize_t): PPyObject {...}{.cdecl.}
  PyList_SetItem*: proc (l: PPyObject; index: Py_ssize_t; i: PPyObject): cint {...}{.cdecl.}
  PyObject_Call*: proc (callable_object, args, kw: PPyObject): PPyObject {...}{.cdecl.}
  PyObject_IsTrue*: proc (o: PPyObject): cint {...}{.cdecl.}
  PyObject_GetAttrString*: proc (o: PPyObject; name: cstring): PPyObject {...}{.cdecl.}
  PyObject_SetAttrString*: proc (o: PPyObject; name: cstring; v: PPyObject): cint {...}{.cdecl.}
  PyObject_Dir*: proc (o: PPyObject): PPyObject {...}{.cdecl.}
  PyObject_Str*: proc (o: PPyObject): PPyObject {...}{.cdecl.}
  PyObject_GetIter*: proc (o: PPyObject): PPyObject {...}{.cdecl.}
  PyObject_GetItem*: proc (o, k: PPyObject): PPyObject {...}{.cdecl.}
  PyObject_SetItem*: proc (o, k, v: PPyObject): cint {...}{.cdecl.}
  PyObject_RichCompareBool*: proc (a, b: PPyObject; op: cint): cint {...}{.cdecl.}
  PyObject_GetBuffer*: proc (o: PPyObject; b: var RawPyBuffer; flags: cint): cint {...}{.cdecl.}
  PyBuffer_Release*: proc (b: var RawPyBuffer) {...}{.cdecl.}
  PyErr_NewException*: proc (name: cstring; base: PPyObject; dict: PPyObject): PPyObject {...}{.
      cdecl.}
  PyIter_Next*: proc (o: PPyObject): PPyObject {...}{.cdecl.}
  PyLong_AsLongLong*: proc (l: PPyObject): int64 {...}{.cdecl.}
  PyFloat_AsDouble*: proc (l: PPyObject): cdouble {...}{.cdecl.}
  PyBool_FromLong*: proc (v: clong): PPyObject {...}{.cdecl.}
  PyFloat_Type*: PyTypeObject
  PyComplex_Type*: PyTypeObject
  PyCapsule_Type*: PyTypeObject
  PyTuple_Type*: PyTypeObject
  PyList_Type*: PyTypeObject
  PyBytes_Type*: PyTypeObject
  PyUnicode_Type*: PyTypeObject
  PyType_IsSubtype*: proc (t1, t2: PyTypeObject): cint {...}{.cdecl.}
  when declared(Complex64):
      PyComplex_AsCComplex*: proc (op: PPyObject): Complex64 {...}{.cdecl.}

  else:
      PyComplex_AsCComplex*: proc (op: PPyObject): Complex {...}{.cdecl.}

  PyComplex_RealAsDouble*: proc (op: PPyObject): cdouble {...}{.cdecl.}
  PyComplex_ImagAsDouble*: proc (op: PPyObject): cdouble {...}{.cdecl.}
  PyUnicode_AsUTF8String*: proc (o: PPyObject): PPyObject {...}{.cdecl.}
  PyBytes_AsStringAndSize*: proc (o: PPyObject; s: ptr ptr char; len: ptr Py_ssize_t): cint {...}{.
      cdecl.}
  PyUnicode_FromString*: proc (s: cstring): PPyObject {...}{.cdecl.}
  PyUnicode_CompareWithASCIIString*: proc (o: PPyObject; s: cstring): cint {...}{.cdecl.}
  PyString_AsString*: proc (o: PPyObject): cstring {...}{.cdecl.}
  PyDict_Type*: PyTypeObject
  PyDict_New*: proc (): PPyObject {...}{.cdecl.}
  PyDict_Size*: proc (d: PPyObject): Py_ssize_t {...}{.cdecl.}
  PyDict_GetItemString*: proc (o: PPyObject; k: cstring): PPyObject {...}{.cdecl.}
  PyDict_SetItemString*: proc (o: PPyObject; k: cstring; v: PPyObject): cint {...}{.cdecl.}
  PyDict_GetItem*: proc (o: PPyObject; k: PPyObject): PPyObject {...}{.cdecl.}
  PyDict_SetItem*: proc (o: PPyObject; k, v: PPyObject): cint {...}{.cdecl.}
  PyDict_Keys*: proc (o: PPyObject): PPyObject {...}{.cdecl.}
  PyDict_Values*: proc (o: PPyObject): PPyObject {...}{.cdecl.}
  PyDict_Contains*: proc (o: PPyObject; k: PPyObject): cint {...}{.cdecl.}
  PyDealloc*: proc (o: PPyObject) {...}{.nimcall.}
  PyErr_Clear*: proc () {...}{.cdecl.}
  PyErr_SetString*: proc (o: PPyObject; s: cstring) {...}{.cdecl.}
  PyErr_Occurred*: proc (): PPyObject {...}{.cdecl.}
  PyExc_TypeError*: PPyObject
  PyCapsule_New*: proc (p: pointer; name: cstring; destr: proc (o: PPyObject) {...}{.cdecl.}): PPyObject {...}{.
      cdecl.}
  PyCapsule_GetPointer*: proc (c: PPyObject; name: cstring): pointer {...}{.cdecl.}
  PyImport_ImportModule*: proc (name: cstring): PPyObject {...}{.cdecl.}
  PyEval_GetBuiltins*: proc (): PPyObject {...}{.cdecl.}
  PyEval_GetGlobals*: proc (): PPyObject {...}{.cdecl.}
  PyEval_GetLocals*: proc (): PPyObject {...}{.cdecl.}
  PyCFunction_NewEx*: proc (md: ptr PyMethodDef; self, module: PPyObject): PPyObject {...}{.
      cdecl.}
  pythonVersion*: int
  when not false:
      PyErr_Print: proc () {...}{.cdecl.}

  PyErr_Fetch*: proc (ptype, pvalue, ptraceback: ptr PPyObject) {...}{.cdecl.}
  PyErr_NormalizeException*: proc (ptype, pvalue, ptraceback: ptr PPyObject) {...}{.cdecl.}
  PyErr_GivenExceptionMatches*: proc (given, exc: PPyObject): cint {...}{.cdecl.}
  PyExc_BaseException*: PPyObject
  PyExc_Exception*: PPyObject
  PyExc_ArithmeticError*: PPyObject
  PyExc_FloatingPointError*: PPyObject
  PyExc_OverflowError*: PPyObject
  PyExc_ZeroDivisionError*: PPyObject
  PyExc_AssertionError*: PPyObject
  PyExc_OSError*: PPyObject
  PyExc_IOError*: PPyObject
  PyExc_ValueError*: PPyObject
  PyExc_EOFError*: PPyObject
  PyExc_MemoryError*: PPyObject
  PyExc_IndexError*: PPyObject
  PyExc_KeyError*: PPyObject
  NimPyException*: PPyObject

Procs

proc to(p: PPyObject; t: typedesc): ptr t:type {...}{.inline.}
proc loadPyLibFromThisProcess(): PyLib {...}{.inline, raises: [Exception], tags: [].}
proc initPyLibIfNeeded() {...}{.inline, raises: [Exception], tags: [RootEffect].}