from tkinter import Tk, Canvas, Frame, BOTH
from math import *
from re import *
win = Tk()
win.geometry('500x500')
win.resizable(False, False)
c = input()
x = []
if search(r'\bsqrt\b', c):
a = search(r'\d*', c)
print(a)
for i in range(501):
x.append((i+3))
x.append(400 - (sqrt(i)*a[0]))
else:
print('Не разобран ввод')
print('x=', x)
x = [1,2,3,4]
canvas = Canvas()
canvas.create_line(3, 400, 503, 400, fill = 'red', width = 2)
canvas.create_line(3, 400, 3, 0, fill = 'red', width = 2)
canvas.create_polygon(x, outline = 'red', fill = 'white', width = 2)
canvas.pack(fill=BOTH, expand=1)
win.mainloop()
subp = subprocess.Popen('wake.mp3', shell=True) # Windows
subp = subprocess.Popen(["xdg-open", 'wake.mp3']) # Linux
# путь к каталогу из которого запустился скрипт
# скрипт или экзешник
if getattr(sys, 'frozen', False):
application_path = os.path.dirname(sys.executable) # путь к каталогу рантайм exe
your_file = application_path + '\wake.mp3'
elif __file__:
application_path = os.path.dirname(__file__) # путь к каталогу запуск в интерпретаторе
https://sw.kovidgoyal.net/kitty/