reformat file to spaces before and after equal sign

This commit is contained in:
julian 2024-01-20 21:50:48 +01:00
parent d39dd9d484
commit a8b5020419

View File

@ -37,43 +37,42 @@ journal = ttk.Frame(journal)
journal.pack()
# name
name_label = ttk.Label(journal, text="Dein Name:")
name_label.pack(fill='x', expand=True)
name_entry = ttk.Entry(journal, textvariable=name)
name_entry.pack(fill='x', expand=True)
name_label = ttk.Label(journal, text = "Dein Name:")
name_label.pack(fill = 'x', expand = True)
name_entry = ttk.Entry(journal, textvariable = name)
name_entry.pack(fill = 'x', expand = True)
name_entry.focus()
# textbox
message_label = tk.Label(journal, text="Deine Nachricht:")
message_label.pack(fill='x', expand=True)
#message_text = ttk.Text(journal, height=50)
message_text = tk.Text(journal)
message_label = tk.Label(journal, text = "Deine Nachricht:")
message_label.pack(fill = 'x', expand = True)
#message_text = ttk.Text(journal, height = 50)
message_text = tk.Text(journal, height = 50)
message_text.pack()
def send_button_clicked():
with open(journal_filename_path, "a") as journal_of_the_day:
journal_of_the_day.write(name.get() + "\n")
message_text_str=message_text.get()
journal_of_the_day.write(message_text_str + "\n")
journal_of_the_day.write(message_text.get() + "\n")
journal_of_the_day.write("-----------------\n")
showinfo(title="Information", message="Deine Nachricht wurde gespeichert")
showinfo(title = "Information", message = "Deine Nachricht wurde gespeichert")
# Send Button
button_send = ttk.Button(
journal,
text="Abschicken",
# command=lambda: showinfo(title="Information", message="Deine Nachricht wurde gespeichert")
command=lambda: send_button_clicked()
text = "Abschicken",
# command = lambda: showinfo(title = "Information", message = "Deine Nachricht wurde gespeichert")
command = lambda: send_button_clicked()
)
button_send.pack()
# Quit Button
button_quit = ttk.Button(
journal,
text="Speichern und Beenden",
command=lambda: journal.quit()
text = "Speichern und Beenden",
command = lambda: journal.quit()
)
button_quit.pack()