{% extends "templates/index.html" %} {% autoescape None %} {% block html_head %} {% end %} {% block module_init %} import json from browser import window, document # Disable right click document.bind('contextmenu', lambda event: event.preventDefault()) window.brython_environ = {{brython_environ}} arr = {{class_}}(None, {{python_}}) arr.connect(f'{{ip}}', f'{{port}}') arr._bci_mode = '{{mode}}' if not hasattr(arr, 'DEBUG'): arr.DEBUG = '{{debug}}' == 'True' arr._last_init() {% end %}