[pypy-svn] r7359 - pypy/trunk/src/pypy/translator/tool/pygame

mgedmin at codespeak.net mgedmin at codespeak.net
Thu Nov 18 11:18:11 CET 2004


Author: mgedmin
Date: Thu Nov 18 11:18:10 2004
New Revision: 7359

Modified:
   pypy/trunk/src/pypy/translator/tool/pygame/flowviewer.py
   pypy/trunk/src/pypy/translator/tool/pygame/graphdisplay.py
Log:
When showing the origin of an annotation in variable binding history graph,
also show the operation itself.



Modified: pypy/trunk/src/pypy/translator/tool/pygame/flowviewer.py
==============================================================================
--- pypy/trunk/src/pypy/translator/tool/pygame/flowviewer.py	(original)
+++ pypy/trunk/src/pypy/translator/tool/pygame/flowviewer.py	Thu Nov 18 11:18:10 2004
@@ -54,8 +54,8 @@
         self.linkinfo[linkname] = position_key
         # It would be nice to get the block name somehow
         blockname = block.__class__.__name__
-        self.links[linkname] = '%s, %s, position %r' % (basename, blockname,
-                                                       pos)
+        self.links[linkname] = '%s, %s, position %r:\n%s' % (basename,
+                                        blockname, pos, block.operations[pos])
         return '%s %s' % (wording, linkname)
 
     def followlink(self, funcname):
@@ -187,7 +187,7 @@
                     source = inspect.getsource(func)
                 except IOError:   # e.g. when func is defined interactively
                     source = func.func_name
-                data = '%s:%d  %s' % (func.func_globals.get('__name__', '?'),
+                data = '%s:%d\n%s' % (func.func_globals.get('__name__', '?'),
                                       func.func_code.co_firstlineno,
                                       source.split('\n')[0])
             self.links[name] = data

Modified: pypy/trunk/src/pypy/translator/tool/pygame/graphdisplay.py
==============================================================================
--- pypy/trunk/src/pypy/translator/tool/pygame/graphdisplay.py	(original)
+++ pypy/trunk/src/pypy/translator/tool/pygame/graphdisplay.py	Thu Nov 18 11:18:10 2004
@@ -270,7 +270,7 @@
 
     def drawstatusbar(self):
         text, fgcolor, bgcolor = self.statusbarinfo
-        lines = renderline(text, self.font, fgcolor, self.width)
+        lines = rendertext(text, self.font, fgcolor, self.width)
         totalh = 0
         for img in lines:
             w, h = img.get_size()



More information about the Pypy-commit mailing list