-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.py
More file actions
38 lines (28 loc) · 682 Bytes
/
index.py
File metadata and controls
38 lines (28 loc) · 682 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
34
35
36
37
38
# imports
import eel
import sys
import os
# main
script_dir = os.path.dirname(__file__)
@eel.expose
def get_image(options): # frame=1, size=(150, 150)):
print("Image requested")
@eel.expose
def create_layer(options):
content = None
if options.type == "text":
content = putText()
# run
if __name__ == "__main__":
if len(sys.argv) > 1 and sys.argv[1] == "--develop":
eel.init("client")
eel.start(
{"port": 3000},
options={"port": 8888, "host": "localhost"},
suppress_error=True,
# size=screen_size(),
)
else:
eel.init("build")
eel.start("index.html")
# end