PyROOT auto completion in python IDEs

Dear experts,

I would like to set up my IDE (LiClipse - for PyDev based on Eclipse) to use tools of IDE for code development, especially the auto completion. This works fine with ordinary python modules but not with ROOT module. How to setup PyROOT for auto completion, or maybe more precise how to set up IDE for ROOT module auto completion, please?

I use LiClipse IDE (but in principle any python IDE would be acceptable) with rootpy install over pip (or directly using PyROOT compiled with ROOT 6).

If I understand PyROOT uses some layer to access C based ROOT code(like ROOT objects, etc.), therefore python does not see any ROOT object. It there a way how to tell python where the ROOT objects are defined to be able to generate a ‘skeleton’ that contains function prototypes, and uses it for completion? Thank you.

Cheers,
Petr

1 Like

Hi,

this is how we solved the issue for ipython notebooks: https://github.com/root-project/root/blob/master/bindings/pyroot/JupyROOT/cppcompleter.py
The challenge is that ROOT lazily loads on demand its components.

Cheers,
Danilo

Danilo,
thank you for an inspiration how it is solve for another project. I will think about how to use it in my case of an ordinary python project using the ROOT libraries.

Cheers,
Petr

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