i have made a simple GUI app, with tkinter and configparser, to store the values in my entry/text fields.
But i need help with something. I want to make the pogram assign a new ini file every time the user saves the input from the button and give the inifile a ID starting from 1 to infinite
So the user fill's all entry's and hits the save all information button. The gui must then generate a new inifile (1).
def saveConfig():
filename = "config.ini"
file = open(filename, 'w')
Config = configparser.ConfigParser()
Config.add_section('ORDERDATA')
Config.set("ORDERDATA", "REKVIRENT", e1.get())
Config.set("ORDERDATA", "MODTAGER", e2.get())
Config.set("ORDERDATA", "PATIENTFORNAVN", e3.get())
Config.set("ORDERDATA", "PATIENTEFTERNAVN", e4.get())
Config.set("ORDERDATA", "CPR", e7.get())
Config.set("ORDERDATA", "DOKUMENTATIONSDATO", e5.get())
Config.set("ORDERDATA", "ØNSKET UNDERSØGELSE", e6.get())
Config.set("ORDERDATA", "ANAMNESE", t1.get('1.0', END))
Config.set("ORDERDATA", "INDIKATION", t2.get('1.0', END))
Config.write(file)
file.close()