XDotAn interactive viewer for Graphviz dot files | |
Download |
XDot Ranking & Summary
Advertisement
- License:
- LGPL
- Price:
- FREE
- Publisher Name:
- Jose Fonseca
- Publisher web site:
- http://code.google.com/p/jrfonseca/wiki/XDot
XDot Tags
XDot Description
An interactive viewer for Graphviz dot files XDot is an interactive viewer for Graphviz dot files.It uses internally the graphviz's xdot output format as an intermediate format, and PyGTK and Cairo for rendering.XDot can be used either as a standalone application from command line, or as a library embedded in your python application.Usage:Command Linexdot.py options: --version show program's version number and exit -h, --help show this help message and exitIf no input file is given then it will read the dot graph from the standard input. EmbeddingSample code#!/usr/bin/env pythonimport gtkimport gtk.gdkimport xdotclass MyDotWindow(xdot.DotWindow): def __init__(self): xdot.DotWindow.__init__(self) self.widget.connect('clicked', self.on_url_clicked) def on_url_clicked(self, widget, url, event): dialog = gtk.MessageDialog( parent = self, buttons = gtk.BUTTONS_OK, message_format="%s clicked" % url) dialog.connect('response', lambda dialog, response: dialog.destroy()) dialog.run() return Truedotcode = """digraph G { Hello World Hello -> World}"""def main(): window = MyDotWindow() window.set_dotcode(dotcode) window.connect('destroy', gtk.main_quit) gtk.main()if __name__ == '__main__': main() Here are some key features of "XDot": · Since it doesn't use bitmaps it is fast and has a small memory footprint. · Arbitrary zoom. · Keyboard/mouse navigation. · Supports events on the nodes with URLs. Requirements: · Perl · PyGTK · GraphViz · pyparsing · pydot
XDot Related Software