This paste expires on 2023-04-12 09:17:31.583279. Repaste, or download this paste. . Pasted through web.

from tkinter import *
from tkinter import ttk
# opcje
htmltemplate = """<!DOCTYPE html>
<html>
<head>
<title>Hello world !</title>
<body>
<p>test app</p>
</body>
</html>
"""
# odtad sam kod
global path
def Save_Window():
    Window = tk.Toplevel()
    textsave = ttk.Entry(Window)
    textsave.pack()
    path = textsave.get()
def save():
  savefile = text.get('1.0', 'end')
  with open(path, 'w') as f:
    f.write(savefile)
root = Tk()
root.title("test")
frame = ttk.Frame(root)
text = Text(frame, width=100, height=25)
text.pack()
text.insert('1.0', htmltemplate)
root.bind('<Control-s>', save)
frame.pack()
root.mainloop()
Filename: main.py. Size: 679b. View raw, , hex, or download this file.