All, I have attempted this a few different ways and am still struggling here.
I want to have someone write in this Entry Box and then once submit is hit, it should write the text to the .txt file. I'm obviously not very good.
import datetime
from tkinter import *
def save():
with open("text.txt", "a") as f:
now = datetime.datetime.now()
test = TxtComplaint.get()
test = str(test)
f.write(test)
f.write(now)
window = Tk()
window.title("Documentation Window")
lbl = Label(window, text = "Enter In The Employee's Information")
TxtComplaint = Text(window, height = '10', width = '30')
benter = Button(window, text="Submit", command = save())
TxtComplaint.pack()
ee = Entry(window)
eelbl = Label(window, text = "Whats the name of the employee?")
eename = str(lbl)
lbl.pack()
benter.pack()
ee.pack()
eelbl.pack()
window.mainloop()