You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.0 KiB
55 lines
1.0 KiB
#projet 7 interface graphique
|
|
import tkinter as tk
|
|
|
|
#Fonctions
|
|
def recup():
|
|
message = value.get()
|
|
label.configure(text=message)
|
|
def reseau(adr):
|
|
strIP,strMasque = adr.split("/")
|
|
lstIP = strIP.split(".")
|
|
lstMasque = strmsq.split(".")
|
|
lstreseau = [' ']*4
|
|
for i in range(4):
|
|
lstReseau[i] = str
|
|
|
|
#Creation de la fenetre
|
|
fenetre =tk.Tk()
|
|
fenetre.title("Calcul d'IP")
|
|
canvas=tk.Canvas(width=500,height=500,bg="ivory")
|
|
canvas.grid()
|
|
label =tk.Label(fenetre, text="Calcul de l'adresse réseau")
|
|
label.grid()
|
|
|
|
|
|
|
|
|
|
value = tk.StringVar()
|
|
value.set("Entrez votre adresse")
|
|
adr=tk.Entry(fenetre, textvariable=value, width=20)
|
|
adr.grid()
|
|
bouton =tk.Button(text="valider", command=recup)
|
|
bouton.grid()
|
|
|
|
value = tk.StringVar()
|
|
value.set("Entrez votre masque")
|
|
msq=tk.Entry(fenetre, textvariable=value, width=20)
|
|
msq.grid()
|
|
bouton =tk.Button(text="valider", command=recup,)
|
|
bouton.grid()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fenetre.mainloop()
|