Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
PyROOT Namespace Reference

Classes

class  PyObjRefCounter
 A PyObject wrapper to track reference counting of external objects. More...
 

Functions

PyObject * AddCPPInstancePickling (PyObject *self, PyObject *args)
 Set reduce attribute for CPPInstance objects.
 
PyObject * AddPrettyPrintingPyz (PyObject *self, PyObject *args)
 Add pretty printing pythonization.
 
PyObject * CPPInstanceExpand (PyObject *self, PyObject *args)
 Deserialize pickled objects.
 
PyObject * PyObjRefCounterAsStdAny (PyObject *, PyObject *args)
 

Variables

PyObject * gRootModule = nullptr
 

Function Documentation

◆ AddCPPInstancePickling()

PyObject * PyROOT::AddCPPInstancePickling ( PyObject * self,
PyObject * args )

Set reduce attribute for CPPInstance objects.

Parameters
[in]selfAlways null, since this is a module function.
[in]argsPointer to a Python tuple object containing the arguments received from Python.

The C++ function op_reduce defined above is wrapped in a Python method so that it can be injected in CPPInstance

Definition at line 117 of file CPPInstancePyz.cxx.

◆ AddPrettyPrintingPyz()

PyObject * PyROOT::AddPrettyPrintingPyz ( PyObject * self,
PyObject * args )

Add pretty printing pythonization.

Parameters
[in]selfAlways null, since this is a module function.
[in]argsPointer to a Python tuple object containing the arguments received from Python.

This function adds the following pythonizations to print the object more user-friendly than cppyy by using the output of cling::printValue as the return value of the special method str.

Definition at line 109 of file GenericPyz.cxx.

◆ CPPInstanceExpand()

PyObject * PyROOT::CPPInstanceExpand ( PyObject * self,
PyObject * args )

Deserialize pickled objects.

Parameters
[in]selfAlways null, since this is a module function.
[in]argsPointer to a Python tuple object containing the arguments received from Python.

Helper function that deserializes pickled objects. It needs to be included in the extension module API because otherwise it is not callable from Python. This is important because it will be Python itself calling it when trying to expand a serialized object.

Definition at line 34 of file CPPInstancePyz.cxx.

◆ PyObjRefCounterAsStdAny()

PyObject * PyROOT::PyObjRefCounterAsStdAny ( PyObject * ,
PyObject * args )

Definition at line 89 of file PyROOTModule.cxx.

Variable Documentation

◆ gRootModule

PyObject * PyROOT::gRootModule = nullptr

Definition at line 37 of file PyROOTModule.cxx.