py2dot

October 5, 2008
py2dot example

py2dot example

py2dot is a python script to generate graphs from a  python program.

it interprets a python program as a graphs of function calls. it can represent classes and imported modules.

py2dot is available from pypi.

more information are available here.

Advertisements

3 Responses to “py2dot”

  1. mud_saisem Says:

    it would help if it explains what the following means

    NameError: global name ‘EXCLUDE_CLASSES’ is not defined

    The example on the website does not even work.

    And there are just about no comments explaining in detail what each class does.

    • lbolla Says:

      the code runs fine in Python 2.5, 2.6 and 2.7. I haven’t tried Python 3.x. what version of Python are you using?
      the classes are pretty straightforward and mostly wrappers to easily handler syntax tokens from the Python parser.
      I suggest you to have a look at the parser standard module.

  2. mud_saisem Says:

    Do you have documentation on py2dot ?

    Using the help(py2dot) tells you about all the classes and methods but there are not comments of documented information explaining what each thing does. How do I know what each class does ?

    I have managed to get your example to work, and ran it over a script that uses multiple modules that it imports and it contains multiple classes itself. The output of py2dot is simply the name of the script.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: