Re: [ROOT] Re: PyROOT

From: Brett Viren (bv@bnl.gov)
Date: Mon Mar 01 2004 - 16:40:52 MET


WLavrijsen@lbl.gov writes:
 > Hi Brett,
 > 
 > > Personally, I would much rather write ROOT scripts in Python than
 > > pseudo-C++, so I hope this becomes a standard part of ROOT.
 > 
 > knowing how some people feel, I presume that with "pseudo-C++" you refer
 > to CINT. 

Yes.  And again, sorry, I didn't mean for this to sound like
denigrating the fine work of Masa!

 > If so, please don't: there is no compiler that supports 100% of
 > the C++ standard and CINT is no exception. Further, CINT is constantly
 > improving and if there are specific short-comings that have bitten you in
 > the past, just report it and it will get fixed. Thank you!
 > 
 > > However, I couldn't get "Python from ROOT" to work.  Slide 10 of the
 > > talk shows the Python stuff being in namespace "Python" but I don't
 > > find that defined in v1.3.3.  Maybe this is a more recent development
 > > or implemented outside of the PyROOT area in SEAL?
 > 
 > The talk referred to PyROOT as current in the repository (PyROOT_0_4_0).
 > SEAL 1.3.3 is about 3 months behind current PyROOT.

Okay.  I will try CVS, thanks.

 > > Also, I noticed that operator()() and operator[]() aren't mapped to
 > > Python's __getitem__ and __call__ respectively.  For example:
 > 
 > Yes, as explained in the talk, basic ROOT classes are not naturally
 > supported yet. The reason is that there are Python alternatives, so I
 > made a proper interface to the ROOT ones a lower priority (there are
 > some technical issues with TVector, TString, etc.).

I agree that it is best to use Python basic types where they can do
what the equivalent types in ROOT do (such as in TVector and TString).
However, I was talking about TVector3 (not TVector).  This class
doesn't quite have an obvious basic class analogue in Python, although
the Numeric module might let an array be mostly equivalent.

But in anycase, mapping operator()() and operator[]() to __call__ and
__getitem__ in the Python equivalent seems like a generally useful
thing.

Thanks,
-Brett.



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:06 MET