blob: 1c0627ba0a83b567376b578d4cec217eb1af9204 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
from ..api import APIServer
from ..gui import open_url
from .base import InkstitchExtension
class Simulator(InkstitchExtension):
def __init__(self):
InkstitchExtension.__init__(self)
def effect(self):
api_server = APIServer(self)
port = api_server.start_server()
electron = open_url("/simulator?port=%d" % port)
electron.wait()
api_server.stop()
api_server.join()
|