Jupyter toCpp()

Hey there,

I decided to try the jupyter c++ environment out, but I failed on these lines:

ROOT.toCpp()
AttributeErrorTraceback (most recent call last)
<ipython-input-5-30121309676d> in <module>()
----> 1 ROOT.toCpp()

/cvmfs/cms.cern.ch/slc6_amd64_gcc530/lcg/root/6.08.06-mlhled2/lib/ROOT.pyc in __getattr2(self, name)
    447 
    448     # reaching this point means failure ...
--> 449       raise AttributeError( name )
    450 
    451    def __delattr__( self, name ):

AttributeError: toCpp

The %%cpp magic seems to work properly though. What am I doing wrong? Thank you.

Hi Adam,

can you share the cell?
We reccommend to use the magic, which is much nearer to the “Jupyter way”, rather than the toCpp() usage.

Cheers,
D

The cell is simply:

import ROOT
ROOT.toCpp()

Dear Adam,

As Danilo said, ROOT.toCpp() is not supported anymore. Please use the %%cpp magic instead when you would like to write C++ in a Python notebook.

Best,

Enric

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.