efficient way for building class browsers.

Josiah Carlson jcarlson at nospam.uci.edu
Wed Feb 11 10:40:23 EST 2004


>>>I am looking for a class browser that has these features.
>>
>>Only a browser?  Text or GUI?  What OS?  Any particular GUI toolkit?
> 
>    IDE. Linux,Windows,Mac. PyGTK

Seemingly this suggests that you want an IDE that runs on linux, 
windows, mac, and that uses the PyGTK toolkit.

I personally don't spend much time looking through PyGTK apps, so I 
can't be of much help.  On the other hand, if you have a parser, 
constructing the tree control/widget from the parsing is very easy.


>>You can write a limited parser (subject to certain flaws), one that 
>>doesn't use tokenize or compiler.ast, and get pretty fast results.  I 
>>wrote one to go into my own editor PyPE (pype.sourceforge.net), and it 
>>has no problems parsing a 100k Python source file and displaying the 
>>source tree in a GUI in less than 1/2 second on a celeron 400.
> 
>    I'll try that.  I have come across tagmanager (C) code written for
> the Anjuta (http://anjuta.org) project.  I should give it a try too.

The control in PyPE is written for wxPython, but the parser is platform 
independant.


>    I will put it in brief.  The class browser can't support all
> standard and third party python packages, since most of them is
> available as shared objects.  So mine is focused only on the current
> project, i.e. user created (or application) python files.  So the
> browser should be able to fetch the tags (class, functions, methods)
> from source code along with the line number information.  That's all
> about.  Any further possiblities in this regard is also expected.

Fetching the various function/class/method names is easy, look at the 
parser included with PyPE.  It isn't perfect, but works pretty well 
considering that it is neither a regular expression, nor does it have a 
tokenizer.

  - Josiah



More information about the Python-list mailing list