How to use the pyno.processor.Processor.init_processor function in pyno

To help you get started, we’ve selected a few pyno examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github honix / Pyno / pyno / sub.py View on Github external
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',
                                       batch=batch, group=labelsGroup,
github honix / Pyno / pyno / node.py View on Github external
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,
                                       color=(255, 255, 255, 230))