import tkinter import pyautogui import os root = tkinter.Tk () root.geometry('400x200') root.wm_attributes("-topmost",1) root.title("бизнес") def enter(): global doxod, balance balance = e.get() balance = str(balance) doxod = t.get() doxod = str(doxod) f = open("C:/Users/Desktop/money/balxod.txt", "w+") f.write(balance) f.write(doxod) f.close() e = tkinter.Entry() e.pack() t = tkinter.Entry() t.pack() btn1 = tkinter.Button(root, text='enter', command=enter) btn1.pack() root.mainloop()
f.write(balance + '\n') f.write(doxod + '\n')