Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

What approach should I use to statically analyze a Python code base? In particular, I am looking for ways to:

  • extract and display the class hierarchy,
  • extract and display class relationships,
  • include a cross-reference of all functions, modules and variables

The specific application that I am dealing with is not well documented which is why I am looking to automate the process.

share|improve this question
1  
Have you loaded it up in an ide that supports python? No need to re-invent the wheel. –  MichaelT Jan 25 at 17:55
    
Have a look at LXR. It is not perfect, but should give you a start. Another tool is Pydoc from the Python standard library. –  pefu Jan 31 at 14:05
    
I'd vote to leave open... He's not necessarily asking about a tool, but about an approach. –  haylem Feb 26 at 12:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.