Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, window, x, y, batch, color=(200, 200, 200), code=None,
connects=None, size=(300, 150), id=None):
Element.__init__(self, x, y, color, batch, id)
Processor.init_processor(self, window.global_scope) # node has a processor for calculation
self.editor_size = size
if connects:
self.connected_to = connects
self.code = None
if not code:
sub_pass = pkg_resources.resource_filename('pyno', 'examples/sub_pass.pn')
code = sub_pass # identical to '''examples/blank.pn'''
self.name = ''
self.label = pyglet.text.Label(self.name, font_name=font,
bold=True, font_size=11,
anchor_x='center', anchor_y='center',
def __init__(self, window, x, y, batch, code='0', connects=None, size=None, id=None):
Element.__init__(self, x, y, (230, 230, 230), batch, id)
if size:
self.w, self.h = size
if connects:
self.connected_to = connects
self.window = window
self.code = code
self.document = pyglet.text.document.FormattedDocument(self.code)
self.document.set_style(0, len(self.document.text),
dict(font_name=font,
font_size=11,
color=(0, 0, 0, 230)))
self.layout = pyglet.text.layout.IncrementalTextLayout(
def __init__(self, window, x, y, batch, color=(200, 200, 200), code="",
connects=None, size=(300, 150), id=None):
Element.__init__(self, x, y, color, batch, id)
Processor.init_processor(self, window.global_scope) # node has a processor for calculation
self.window = window
self.editor_size = size
self.code = code
if connects:
self.connected_to = connects
self.env = {}
self.name = ''
self.label = pyglet.text.Label(self.name, font_name=font,
bold=True, font_size=11,
anchor_x='center', anchor_y='center',
batch=batch, group=labelsGroup,