File size: 685 Bytes
b75ee05
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import pathlib
import tkinter as tk

MARKER = pathlib.Path(r"__MARKER__")
READY = pathlib.Path(str(MARKER) + ".ready")

root = tk.Tk()
root.title("Canvas")
root.geometry("560x360+200+150")
canvas = tk.Canvas(root, width=560, height=360, highlightthickness=0)
canvas.pack()
canvas.create_rectangle(0, 0, 560, 360, fill="#1e2430", outline="")
canvas.create_oval(40, 60, 160, 180, fill="#e05252", outline="")
canvas.create_rectangle(220, 60, 340, 180, fill="#4f9dd8", outline="")
canvas.create_polygon(400, 180, 460, 60, 520, 180, fill="#5fd08a", outline="")
canvas.create_rectangle(40, 240, 520, 300, fill="#c9a227", outline="")

root.update()
READY.write_text("mapped")
root.mainloop()