[pypy-svn] r44226 - pypy/branch/graphserver-dist/pypy/translator/tool

arigo at codespeak.net arigo at codespeak.net
Wed Jun 13 12:10:01 CEST 2007


Author: arigo
Date: Wed Jun 13 12:10:01 2007
New Revision: 44226

Added:
   pypy/branch/graphserver-dist/pypy/translator/tool/pygame.py   (contents, props changed)
Modified:
   pypy/branch/graphserver-dist/pypy/translator/tool/   (props changed)
   pypy/branch/graphserver-dist/pypy/translator/tool/graphpage.py
Log:
A quick svn:externals hack that seems to be enough for simple cases.


Modified: pypy/branch/graphserver-dist/pypy/translator/tool/graphpage.py
==============================================================================
--- pypy/branch/graphserver-dist/pypy/translator/tool/graphpage.py	(original)
+++ pypy/branch/graphserver-dist/pypy/translator/tool/graphpage.py	Wed Jun 13 12:10:01 2007
@@ -7,34 +7,7 @@
 from pypy.annotation.classdef import ClassDef
 from pypy.tool.uid import uid
 
-
-class GraphPage:
-    """Base class for the server-side content of one of the 'pages'
-    (one graph) sent over to and displayed by the client.
-    """
-    def __init__(self, *args):
-        self.args = args
-
-    def content(self):
-        """Compute the content of the page.
-        This doesn't modify the page in place; it returns a new GraphPage.
-        """
-        if hasattr(self, 'source'):
-            return self
-        else:
-            new = self.__class__()
-            new.source = ''  # '''dot source'''
-            new.links  = {}  # {'word': 'statusbar text'}
-            new.compute(*self.args)   # defined in subclasses
-            return new
-
-    def followlink(self, word):
-        raise KeyError
-
-    def display(self):
-        "Display a graph page locally."
-        from pypy.translator.tool.pygame.graphclient import display_layout
-        display_layout(self)
+from pypy.translator.tool.pygame.graphpage import GraphPage
 
 
 class VariableHistoryGraphPage(GraphPage):

Added: pypy/branch/graphserver-dist/pypy/translator/tool/pygame.py
==============================================================================
--- (empty file)
+++ pypy/branch/graphserver-dist/pypy/translator/tool/pygame.py	Wed Jun 13 12:10:01 2007
@@ -0,0 +1,7 @@
+"""XXX temporary integration hack"""
+
+import autopath, os
+
+# make pypy.translator.tool.pygame behave like a package whose content
+# is in the dotviewer/ subdirectory
+__path__ = [os.path.join(autopath.this_dir, 'dotviewer')]



More information about the Pypy-commit mailing list