0
déclarations d'importation
import from tkinter import *
import tkinter.simpledialog
import tkinter.messagebox
from tkinter import ttk
from time import strftime
now = strftime("%x %Z %X")
fenêtre Réglage
root=Tk()
root.title("ON TOP OF THE WORLD")
canvas= Canvas(root, width=350, height=250)
canvas.pack()
photo=PhotoImage(file='/Users/m/Desktop/TOTW.gif')
canvas.create_image(0, 0, anchor = NW, image=photo)
Bienvenue utilisateur
tkinter.messagebox.showinfo("Hello,today is", now)
demander à l'utilisateur
name=tkinter.simpledialog.askstring("name","What is your name?")
processus d'entrée
output = "Hello, %s! May the only place you find yourself today is on top of the world !" %name
show Sortie
tkinter.messagebox.showinfo(now, output)
PROCHE
def on_closing():
if tkinter.messagebox.askokcancel("Quit", "Do you want to quit?"):
root.destroy()
root.protocol(on_closing)
root.mainloop()
Alors .. Quelle est votre question? Avez-vous une erreur? Qu'attendez-vous et comment fonctionne ce code? Vous devriez élaborer sur votre problème. – Lafexlos