class Sandbox: def __init__(self): window = OpenGLWindow(600, 300, "Sandbox") self.game_manager = Application(60, window) def start(self): self.game_manager.run()
from core.application import Application if __name__ == "__main__": app = Application("client", { "device": { "class": "core.devices.tun.TUNDevice" }, "link": { "class": "core.links.tcp.TCPLink", "port": 20121, "host": "184.82.229.13", }, "addons": [ { "class": "core.addons.nameserver_override.NameserversEditor", "nameservers": [ "8.8.4.4", "208.67.222.222", ] } ], "set_default_gateway": True }) app.run()
def Dispatcher(env, start_response): request = Request(env, start_response) Application.run(request) return request.getResponseBody()
import sys #sys.path.append('Q:/_sandbox_python/_platform/websockets-7.0/src') #sys.path.append('Q:/_sandbox_python/_platform/paho-mqtt-1.4.0/src') sys.path.append( '.') # Permet les includes depuis le repertoire courant, pas terrible from core.application import Application from modules.property.PropertyModule import PropertyModule from modules.admin.AdminModule import AdminModule from modules.loto.LotoModule import LotoModule #from modules.homie.HomieModule import HomieModule if __name__ == "__main__": application = Application('data/application.db') application.addModule(AdminModule()) application.addModule(PropertyModule()) application.addModule(LotoModule()) application.run('localhost', 6789)