Home | News | Documentation | Download

Wrapping exec object in pyroot


Please read tips for efficient and successful posting and posting code

_ROOT Version: 6.18
_Platform: Mac Mojava
_Compiler: Clang

Hello,

I’m trying to wrap the example from a previous discussion

in pyroot but without success. These two lines are the issue,

    TExec *ex = new TExec("ex","DrawCol();");

    gr->GetListOfFunctions()->Add(ex);

Any advice, thanks,

Damir


@etejedor can you take a look please?

Hi Damir,

Can you elaborate a bit more on what you would like to do, exactly?

You have some code in C++ that you want to execute from Python?

Yes; the same macro in the link provided but only in pyroot; The code will plot Graph points with different colors; I cannot map out this to pyroot. This passing of function TExec(“ex”,“DrawCol();”); doesn’t work,

Damir

Hi,
So you translated the C++ macro in the other post to a Python script, and you are trying to run that script?

Or what is it exactly that you are running in Python? Can you attach/copy it here?