1
I have a problem about Tkinter, I am not able to save the value of an Entry() in any variable, so as soon as I can use the name of that file to create a TXT.
Follow the code:
def criarPL ():
global nome_pl
def salvar():
arq = open("{0}.txt".format(nome_pl), "w")
arq.close()
janela2 = Tk()
janela2.title("Criar Playlist")
bt_salvar = Button(janela2, width=20, text="SALVAR", command=salvar)
nome_pl = Entry(janela2)
nome_pl.insert(END, "NOME DA PLAYLIST\n")
nome_pl.pack()
nome_pl.place (x=170, y=2)
bt_salvar.place(x=2, y=2)
janela2.geometry("400x27+250+250")
janela2.mainloop()
If anyone can help me, I’d be grateful.
Thanks again haha.
– Félix
is spinning here
– Félix