|
|
|
@ -6,13 +6,15 @@ def recup(): |
|
|
|
message = value.get() |
|
|
|
label.configure(text=message) |
|
|
|
|
|
|
|
def reseau(adr,msq): |
|
|
|
lstIP = adr.split(".") |
|
|
|
lstMasque = msq.split(".") |
|
|
|
lstreseau = [' ']*4 |
|
|
|
def reseau(): |
|
|
|
ip = Entree |
|
|
|
masque = Entree1 |
|
|
|
lstIP = ip.split(".") |
|
|
|
lstMasque = masque.split(".") |
|
|
|
lstReseau = [' ']*4 |
|
|
|
for i in range(4): |
|
|
|
lstReseau[i] =str(lstIP[i])&int(lstMasque[i]) |
|
|
|
return ".".join(lstReseau) |
|
|
|
adr_reseau_f = ".".join(lstReseau) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -28,17 +30,15 @@ label.grid() |
|
|
|
#Entrées et bouton valider |
|
|
|
value = tk.StringVar() |
|
|
|
value.set("Entrez votre adresse") |
|
|
|
adr=tk.Entry(fenetre, textvariable=value, width=20) |
|
|
|
adr.grid() |
|
|
|
Entree=tk.Entry(fenetre, textvariable=value, width=20) |
|
|
|
Entree.grid() |
|
|
|
value = tk.StringVar() |
|
|
|
value.set("Entrez votre masque") |
|
|
|
msq=tk.Entry(fenetre, textvariable=value, width=20) |
|
|
|
msq.grid() |
|
|
|
Entree1=tk.Entry(fenetre, textvariable=value, width=20) |
|
|
|
Entree1.grid() |
|
|
|
bouton =tk.Button(text="valider", command=recup,) |
|
|
|
bouton.grid() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
label_rsultat =tk.Label(fenetre, text="Adresse réseau: adr_reseau_f") |
|
|
|
|
|
|
|
|
|
|
|
fenetre.mainloop() |