aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArmin Rigo <arigo@tunes.org>2009-04-14 11:47:39 +0000
committerArmin Rigo <arigo@tunes.org>2009-04-14 11:47:39 +0000
commiteb3a8d48257a120bde7080cb7290db42a7a8e449 (patch)
tree5ecad7d389b4a41ac857322f3d40bd9aa655041a /dotviewer
parent(in-progress) try to split ootype and lltype graph backend into two different... (diff)
downloadpypy-eb3a8d48257a120bde7080cb7290db42a7a8e449.tar.gz
pypy-eb3a8d48257a120bde7080cb7290db42a7a8e449.tar.bz2
pypy-eb3a8d48257a120bde7080cb7290db42a7a8e449.zip
Support translator.viewcg() with an argument now:
the graph to display at the start.
Diffstat (limited to 'dotviewer')
-rw-r--r--dotviewer/graphpage.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/dotviewer/graphpage.py b/dotviewer/graphpage.py
index 88df7bad33..9e61d65cd5 100644
--- a/dotviewer/graphpage.py
+++ b/dotviewer/graphpage.py
@@ -5,8 +5,9 @@ class GraphPage(object):
"""
save_tmp_file = None
- def __init__(self, *args):
+ def __init__(self, *args, **kwds):
self.args = args
+ self.kwds = kwds
def content(self):
"""Compute the content of the page.
@@ -18,7 +19,7 @@ class GraphPage(object):
new = self.__class__()
new.source = '' # '''dot source'''
new.links = {} # {'word': 'statusbar text'}
- new.compute(*self.args) # defined in subclasses
+ new.compute(*self.args, **self.kwds) # defined in subclasses
return new
def followlink(self, word):