/usr/include/root/TPython.h is in libroot-bindings-python-dev 5.34.14-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | // @(#)root/pyroot:$Id$
// Author: Wim Lavrijsen April 2004
#ifndef ROOT_TPython
#define ROOT_TPython
//////////////////////////////////////////////////////////////////////////////
// //
// TPython //
// //
// Access to the python interpreter and API onto PyROOT. //
// //
//////////////////////////////////////////////////////////////////////////////
// Bindings
#include "TPyReturn.h"
// ROOT
#ifndef ROOT_TObject
#include "TObject.h"
#endif
class TPython {
private:
static Bool_t Initialize();
public:
// load a python script as if it were a macro
static void LoadMacro( const char* name );
// execute a python stand-alone script, with argv CLI arguments
static void ExecScript( const char* name, int argc = 0, const char** argv = 0 );
// execute a python statement (e.g. "import ROOT" )
static Bool_t Exec( const char* cmd );
// evaluate a python expression (e.g. "1+1")
static const TPyReturn Eval( const char* expr );
// bind a ROOT object with, at the python side, the name "label"
static Bool_t Bind( TObject* object, const char* label );
// enter an interactive python session (exit with ^D)
static void Prompt();
// type verifiers for ObjectProxy
static Bool_t ObjectProxy_Check( PyObject* pyobject );
static Bool_t ObjectProxy_CheckExact( PyObject* pyobject );
// type verifiers for MethodProxy
static Bool_t MethodProxy_Check( PyObject* pyobject );
static Bool_t MethodProxy_CheckExact( PyObject* pyobject );
// object proxy to void* conversion
static void* ObjectProxy_AsVoidPtr( PyObject* pyobject );
// void* to object proxy conversion, returns a new reference
static PyObject* ObjectProxy_FromVoidPtr(
void* addr, const char* classname, Bool_t python_owns = kFALSE );
virtual ~TPython() { }
ClassDef(TPython,0) //Access to the python interpreter
};
#endif
|