"""Try the web page without the table: the real design library, driven against the GRBL simulator. Run from the software folder: python3 tests/demo_web.py then open http://127.0.0.1:8766""" import os import sys sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) sys.path.insert(0, os.path.dirname(__file__)) from sandtable import config from sandtable.grbl import Controller from sandtable.web import serve from fakegrbl import FakeGrbl if __name__ == '__main__': fake = FakeGrbl(speedup=float(os.environ.get('SPEEDUP', '30')), carriage_mm=40.0) c = Controller(fake, 'grbl', log=lambda *a: None) c.wake(wait=0.3) serve(c, config.load(), port=int(os.environ.get('PORT', '8766')), open_browser='--no-browser' not in sys.argv)