-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
34 lines (24 loc) · 722 Bytes
/
main.py
File metadata and controls
34 lines (24 loc) · 722 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
import tkinter as tk
import ttkbootstrap as ttk
import os
from utils.thumbnail import create_standard_thumbnail
from emulator.printer import PrinterEmulator
from ui.main_window import MainWindow
def main():
thumbnail_path = create_standard_thumbnail()
emulator = PrinterEmulator()
# Load saved configuration
emulator.load_config_from_json()
if thumbnail_path:
emulator.set_thumbnail(thumbnail_path)
root = ttk.Window(
title="FlashForge API Emulator",
themename="darkly",
resizable=(True, True)
)
app = MainWindow(root, emulator)
emulator.log = app.log
emulator.server.log = app.log
root.mainloop()
if __name__ == "__main__":
main()