# -*- coding: utf-8 -*- """ Created on Wed Sep 18 22:21:24 2020 @author: Jean-Paul """ import tkinter def save(): File_save = open("Sauvegarde.txt", "w") File_save.write("Essai") File_save.close() # CrĂ©ation de la fenĂȘtre principale window_1 = tkinter.Tk() window_1.geometry("200x150+20+20") Bouton_save = tkinter.Button(window_1, text="Save", fg="black", font=("Helvetica", 12)) Bouton_save.place(x=10, y=10) Bouton_save.bind('', save()) window_1.mainloop()