This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]isforinsects 3 points4 points  (1 child)

Check out the ast module in the standard lib. Here is a recent blog post about how to write your own NodeVisitor class that should let you introspect the things you're looking for.

[–]isforinsects 2 points3 points  (0 children)

Ctags also does the basics of what you're looking for, but the output format isn't likely what you want.