efficient way for building class browsers.

Sridhar R sridharinfinity at yahoo.com
Sat Feb 7 21:05:19 EST 2004


I am looking for a class browser that has these features.

   1. Given a symbol (class, method or function) it should giveback
the lineno n source code
   2. It should be efficient and quick.

I looked at the `pyclbr` module, but it's slower.  I will be _often_
regenerating the symbols from exactly one python source file.  But for
an average python script in my machine it takes 2 secs for pyclbr to
build the dictionary of symbols.

When I profiled pyclbr, I found that most of the time was spent on the
tokenize.get_token** functions, and the remaining time was spent on
pyclbr._readmodule function.

Remember I need a class browser, that also tells me the line no in
source code of that symbol. (So compiler module  (ast) can't be used -
Is it so? )

Are there any better ways for achieving this?



More information about the Python-list mailing list