How to use the pyno.window.PynoWindow 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 / runner.py View on Github external
def create_window():
    config = pyglet.gl.Config(double_buffer=True, depth_size=0,
                              stencil_size=0, aux_buffers=0,
                              samples=1)

    try:
        window = PynoWindow(config, filename='.auto-saved.pn')
    except:
        # if config is crashed run more default one
        print('Runnig using default config...')
        window = PynoWindow(pyglet.gl.Config(), filename='.auto-saved.pn')
    
    return window
github honix / Pyno / pyno / Pyno.py View on Github external
import pyglet
from pyno import window

# import profile

if __name__ == '__main__':
    print('Loading...')
    config = pyglet.gl.Config(double_buffer=True, depth_size=0,
                              stencil_size=0, aux_buffers=0,
                              samples=1)
    try:
        pwindow = window.PynoWindow(config, filename='.auto-saved.pn')
    except:
        # if config is crashed run more default one
        pwindow = window.PynoWindow(pyglet.gl.Config(), filename='.auto-saved.pn')

    pyglet.options['debug_gl'] = False  # performance boost?

    # profile.run('pyglet.app.run()', sort=1)
    pyglet.app.run()
github honix / Pyno / pyno / sub.py View on Github external
def new_code(self, code):
        # New code, search for in/outputs

        if self.code == code:
            return

        self.problem = False

        self.code = code
        self.name = code.strip()
        self.label.text = self.name + ' →'

        try:
            pwin = window.PynoWindow(pyglet.gl.Config(),
                                     caption='→ ' + self.name)
            pwin.load_pyno(self.code)
            if self.pwindow:
                self.pwindow.close()
                del self.pwindow
            self.pwindow = pwin
        except Exception as ex:
            self.problem = ex  # abusing since this resolves in most cases like "True"
            self.er_label.text = repr(ex)
            return

        # window visibility handeled in window.py

        self.pwindow.nodes_update()

        inputs, outputs = [], []
github honix / Pyno / pyno / Pyno.py View on Github external
import pyglet
from pyno import window

# import profile

if __name__ == '__main__':
    print('Loading...')
    config = pyglet.gl.Config(double_buffer=True, depth_size=0,
                              stencil_size=0, aux_buffers=0,
                              samples=1)
    try:
        pwindow = window.PynoWindow(config, filename='.auto-saved.pn')
    except:
        # if config is crashed run more default one
        pwindow = window.PynoWindow(pyglet.gl.Config(), filename='.auto-saved.pn')

    pyglet.options['debug_gl'] = False  # performance boost?

    # profile.run('pyglet.app.run()', sort=1)
    pyglet.app.run()
github honix / Pyno / pyno / runner.py View on Github external
def create_window():
    config = pyglet.gl.Config(double_buffer=True, depth_size=0,
                              stencil_size=0, aux_buffers=0,
                              samples=1)

    try:
        window = PynoWindow(config, filename='.auto-saved.pn')
    except:
        # if config is crashed run more default one
        print('Runnig using default config...')
        window = PynoWindow(pyglet.gl.Config(), filename='.auto-saved.pn')
    
    return window