Quoting unsafe characters¶
Let’s make sure our string quoting function can handle anything:
>>> import objgraph
>>> all_the_chars = dict((chr(i), i) for i in range(256))
>>> objgraph.show_refs(all_the_chars, too_many=600,
... filename='all-the-chars.dot')
Graph written to all-the-chars.dot (... nodes)
Trust me, you do not want to see the resulting image.