"
print(data)(data)
def save_once ():open("file.html","w")asfile:
file.write(data).write(data)
os.startfile("file.html").startfile("file.html")
def to_html (sự kiện):
memo=load_template()=load_template()
Với Open ("File.html", "W") Asfile:
# Nhận dữ liệu từ Pickleshow(event):
# cửa sổ' call this to show the note in the tbx '''
mm=lst.get(lst.curselection())=lst.get(lst.curselection())
tbx.delete("0.0",tk.END).delete("0.0",tk.END)
tbx.insert(tk.END,memo[mm]).insert(tk.END,memo[mm])
show def (sự kiện):add_memo(event):
'' 'Gọi cái này để hiển thị ghi chú trong TBX' ''("Here add a key, asking the name of the key with simpledialog")
def add_memo (sự kiện):
In ("Ở đây thêm một phím, hỏi tên của phím với SimpleDialog")help():
đi qua' call this to show some help '''
print('''('''
DEF HELP ():
'' 'Gọi cái này để hiển thị một số trợ giúp' '
Bản ghi nhớ là từ điển
Key = Tên của sự kiện
value = multiline với những thứ cần nhớ được phân tách bởi dấu phẩy
LST là hộp danh sách với các phím
TBX là hộp văn bản'')
root=tk.Tk()=tk.Tk()
Nếu bạn chọn một khóa, bạn sẽ thấy các giá trị trong TBX.title("Memo - use , to separate the items for each memo")
'' ')
style=ttk.Style(root)=ttk.Style(root)
root.title ("Memo - sử dụng, để tách các mục cho mỗi bản ghi nhớ").tk.call('source','azure dark\\azure dark.tcl')
style.theme_use('azure').theme_use('azure')
frm1=tk.Frame(root)
=tk.Frame(root)
frm1.pack(side="left",fill="both",expand=True).pack(side="left",fill="both",expand=True)
lst=tk.Listbox(frm1)=
tk.Listbox(frm1)
lst.pack(side="left",fill="both",expand=True).pack(side="left",fill="both",expand=True)
forkinmemo:kinmemo:
lst.insert(tk.END,k).insert(tk.END,k)
frm2=tk.Frame(root)=tk.Frame(root)
frm2.pack(side="left").pack(side="left")
tbx=tk.Text(frm2)=
tk.Text(frm2)
tbx.pack(side="left").pack(side="left")
lst.bind("",show).bind("<>",show)
root.bind("",save).bind("",
save)
root.bind("",to_html).bind("",to_html)
root.bind("",add_memo).bind("<+>",add_memo)
root.mainloop().mainloop()