/usr/share/pyshared/glitch/node.py is in python-glitch 0.6-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | "The base Node class."
class Node(object):
def __init__(self, children=[]):
"""
@param children: A list of child nodes.
"""
self.children = list(children)
def render(self, ctx):
"Call C{self.draw()}, then render children."
self.draw(ctx)
for c in self.children:
c.render(ctx)
def draw(self, ctx):
"Perform drawing for this node."
def __repr__(self):
return '%s(children=%r)' % (self.__class__.__name__, self.children)
|