diff --git a/bindings/pyroot/src/Pythonize.cxx b/bindings/pyroot/src/Pythonize.cxx index 6dd1c6bee9cf61b02f25f2e262769f5c60ecf00e..22ae9f0e816c4389dae03db509b6d2daa1aeca82 100644 --- a/bindings/pyroot/src/Pythonize.cxx +++ b/bindings/pyroot/src/Pythonize.cxx @@ -2660,6 +2660,9 @@ Bool_t PyROOT::Pythonize( PyObject* pyclass, const std::string& name ) // add safety for non-TObject derived Get() results Utility::AddToClass( pyclass, "Get", (PyCFunction) TDirectoryFileGet, METH_O ); + // Re-inject here too, since TDirectoryFile redefines GetObject + Utility::AddToClass(pyclass, "GetObject", (PyCFunction)TDirectoryGetObject); + return kTRUE; } @@ -2745,7 +2748,6 @@ Bool_t PyROOT::Pythonize( PyObject* pyclass, const std::string& name ) // allow member-style access to entries in file Utility::AddToClass( pyclass, "__getattr__", (PyCFunction) TFileGetAttr, METH_O ); - } else if ( name.substr(0,8) == "TVector3" ) {