Re: PyDEV + PyROOT

From: <WLavrijsen_at_lbl.gov>
Date: Thu, 5 Feb 2009 10:07:46 -0800


Akira,

> For example, when I type 'ROOT.' in a Eclipse editor window, PyDEV lists
> completion candidates, but there are only

this list will grow as parts from the ROOT namespace are used. At issue is that generating place holders for all available classes would be very memory intensive, and given that the auto-loader can always get more (e.g. user defined) classes it would never be a complete picture anyway.

Note that in general external functions do not provide informative to the python inspection tools. A couple of days ago, I checked in some new code that actually improves on that situation for PyROOT bound methods (this is for PyPy, but works great with pydoc as well). One addition that may work up to an extent (auto-loader again ...), would be the reimplementation of __dir__, but that is a python2.6 feature only.  

> import ROOT
> h = ROOT.TH1D("h", "", 100, 0, 1)
>
> it says "Undefined variable from import: TH1D".

That I don't understand?

> How can I make PyDEV recognize all classes/functions/variables of ROOT?

You could "touch" the ones that you like to use (or all the classes that are in ROOT's class table) in a python startup file. Not sure whether that is the way you want to go, though ...  

Best regards,

           Wim

-- 
WLavrijsen_at_lbl.gov    --    +1 (510) 486 6411    --    www.lavrijsen.net
Received on Thu Feb 05 2009 - 19:06:00 CET

This archive was generated by hypermail 2.2.0 : Fri Feb 06 2009 - 05:50:02 CET