-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.py
More file actions
33 lines (21 loc) · 718 Bytes
/
run.py
File metadata and controls
33 lines (21 loc) · 718 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# this needs to go first to initialize the
# config stuff.
from tektronix.appconfig import AppConfig
config = AppConfig('config.ini')
from tektronix.api import FigureContainer
from tektronix.api import MyApplication
import tornado
def main():
figs = FigureContainer()
figs.add_figure("fig1", figsize=(6, 3.0))
figs.add_figure("fig2", figsize=(6, 3.0))
application = MyApplication(figs)
http_server = tornado.httpserver.HTTPServer(application)
http_server.listen(8080)
print("http://127.0.0.1:8080/")
print("Press Ctrl+C to quit")
loop = tornado.ioloop.IOLoop.instance()
# loop.add_callback(application.test)
loop.start()
if __name__ == '__main__':
main()