idutils and Python

Ramon Diaz-Uriarte rdiaz02 at gmail.com
Wed Aug 23 10:06:31 EDT 2006


On 22 Aug 2006 10:04:12 -0700, sjdevnull at yahoo.com <sjdevnull at yahoo.com> wrote:

> That's usually cscope  http://cscope.sourceforge.net/ but I've not
> tried to use it with Python before; from the web page it looks like it
> may be worth a spin:
> "The fuzzy parser supports C, but is flexible enough to be useful for
> C++ and Java, and for use as a generalized 'grep database' (use it to
> browse large text documents!"
>

Thanks for your answer. I'll take a new look at cscope (I think I
looked at it, but discarded because it seemed to focus on C/C++; never
noticed it is possible use as a general browser for large text
collections).

> I am usually happy with grep, but we only have a medium-large size
> project (320,000 lines of Python code); I can imagine on very large
> codebases that would be too slow to be practical.

I am generally happy with grep (and your code is much larger than
ours) but idutils' output offers both that and, by showing all
together, a kind of poor-man's static call graph, and can be of use
when refactoring.

Thanks again,

R.

On 22 Aug 2006 10:04:12 -0700, sjdevnull at yahoo.com <sjdevnull at yahoo.com> wrote:
> Ramon Diaz-Uriarte wrote:
> > On 21 Aug 2006 22:56:13 -0700, sjdevnull at yahoo.com <sjdevnull at yahoo.com> wrote:
> >
> > > What exactly are you trying to accomplish?  If you want to index
> > > function/class names, variables, etc then you should take a look at
> > > "exuberant ctags" http://ctags.sourceforge.net53 --although it started
> > > off as a C indexer, it has excellent Python support, it's free, and as
> > > a bonus its indices are well supported from inside major editors (vim,
> > > emacs, etc) so you can easily follow code flow, find function/class
> > > definitions, etc.
> >
> >
> > Sorry for not being clear enough. I want the following:
> >
> > a) have my editor go to the point where a function/whatever is defined
>
> That's usually ctags/etags
>
> > b) see all places where a function/whatever is used.
>
> That's usually cscope  http://cscope.sourceforge.net/ but I've not
> tried to use it with Python before; from the web page it looks like it
> may be worth a spin:
> "The fuzzy parser supports C, but is flexible enough to be useful for
> C++ and Java, and for use as a generalized 'grep database' (use it to
> browse large text documents!"
>
> The vim integration is very nice.  It has emacs integration too, but I
> haven't used it and can't comment on how good it is.
>
> > I think the wish "do not use grep, just look at the index file, and
> > immediately display all matches"  is reasonable and probably other
> > Python coders had thought about it before. But I am wondering if I am
> > missing something obvious, as most people seem to be very happy with
> > exuberant ctags.
>
> I am usually happy with grep, but we only have a medium-large size
> project (320,000 lines of Python code); I can imagine on very large
> codebases that would be too slow to be practical.
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>


-- 
Ramon Diaz-Uriarte
Bioinformatics Unit
Spanish National Cancer Centre (CNIO)
http://ligarto.org/rdiaz



More information about the Python-list mailing list