Tue 11 Oct 2005

asdf-viz

This afternoon, for some documentation, I found myself needing to chart dependencies and file structures for ASDF packages.

Now, an ASDF system knows its package dependencies, module and file structures, and name… so why not interrogate it, and produce some output?

160-odd lines later, and the result is asdf-viz. This takes an ASDF package (symbol, string, or system) and outputs DOT, ready to pipe into GraphViz.

Some sample output is here:
There's a bit of room for improvement — it's supposed to output files as ellipses, I haven't labelled the lines, and the layout could be better — but it's a good start.

Bryan O'Connor ran it on UCW, yielding this pretty graph.

Thoughts welcome!

Update: I'm working on clustering and unflattening the output.

Posted at 2005-10-11 23:54:39 by RichardLink to asdf-viz
Comments, trackbacks.

Unicode

Ooh, fun with printing Unicode in Python! Thank you to Christoph Görn for pointing out that my ab.py tool chokes when printing Unicode characters from Address Book records.

The reason and solution are ably explained here: Python's output stream is defaulting to ASCII encoding.

A fix:
import codecs, sys
sys.stdout = codecs.getwriter('utf-8')(sys.stdout)

Posted at 2005-10-11 10:28:13 by RichardLink to Unicode
Comments, trackbacks.

Google
Web holygoat.co.uk
  • richard is: