[pypy-svn] r17744 - pypy/dist/pypy/translator/tool
arigo at codespeak.net
arigo at codespeak.net
Wed Sep 21 20:48:57 CEST 2005
Author: arigo
Date: Wed Sep 21 20:48:55 2005
New Revision: 17744
Modified:
pypy/dist/pypy/translator/tool/make_dot.py
Log:
Accept \n characters in the labels and pass them to 'dot'.
Modified: pypy/dist/pypy/translator/tool/make_dot.py
==============================================================================
--- pypy/dist/pypy/translator/tool/make_dot.py (original)
+++ pypy/dist/pypy/translator/tool/make_dot.py Wed Sep 21 20:48:55 2005
@@ -56,7 +56,7 @@
weight="5",
):
d = locals()
- attrs = [('%s="%s"' % (x, d[x].replace('"', '\\"')))
+ attrs = [('%s="%s"' % (x, d[x].replace('"', '\\"').replace('\n', '\\n')))
for x in ['label', 'style', 'color', 'dir', 'weight']]
self.emit('edge [%s];' % ", ".join(attrs))
self.emit('%s -> %s' % (name1, name2))
@@ -69,7 +69,7 @@
style="filled",
):
d = locals()
- attrs = [('%s="%s"' % (x, d[x].replace('"', '\\"')))
+ attrs = [('%s="%s"' % (x, d[x].replace('"', '\\"').replace('\n', '\\n')))
for x in ['shape', 'label', 'color', 'fillcolor', 'style']]
self.emit('%s [%s];' % (name, ", ".join(attrs)))
More information about the Pypy-commit
mailing list