[pypy-svn] r7239 - pypy/trunk/src/pypy/translator/tool/pygame
bob at codespeak.net
bob at codespeak.net
Mon Nov 15 15:40:35 CET 2004
Author: bob
Date: Mon Nov 15 15:40:35 2004
New Revision: 7239
Modified:
pypy/trunk/src/pypy/translator/tool/pygame/drawgraph.py
Log:
replace '\l' with '\\l' to make its intent clearer
Modified: pypy/trunk/src/pypy/translator/tool/pygame/drawgraph.py
==============================================================================
--- pypy/trunk/src/pypy/translator/tool/pygame/drawgraph.py (original)
+++ pypy/trunk/src/pypy/translator/tool/pygame/drawgraph.py Mon Nov 15 15:40:35 2004
@@ -245,7 +245,7 @@
bgcolor = getcolor(node.fillcolor, (255,255,255))
text = node.label
- lines = text.replace('\l','\l\n').replace('\r','\r\n').split('\n')
+ lines = text.replace('\\l','\\l\n').replace('\r','\r\n').split('\n')
# ignore a final newline
if not lines[-1]:
del lines[-1]
@@ -255,12 +255,12 @@
bkgndcommands = []
for line in lines:
- raw_line = line.replace('\l','').replace('\r','') or ' '
+ raw_line = line.replace('\\l','').replace('\r','') or ' '
img = TextSnippet(self, raw_line, (0, 0, 0), bgcolor)
w, h = img.get_size()
if w>wmax: wmax = w
if raw_line.strip():
- if line.endswith('\l'):
+ if line.endswith('\\l'):
def cmd(img=img, y=hmax):
img.draw(xleft, ytop+y)
elif line.endswith('\r'):
More information about the Pypy-commit
mailing list