From deaa9166e15a6c0a4d9d85e39a64a11a760dc05b Mon Sep 17 00:00:00 2001 From: MICHELAT Corentin Date: Thu, 26 Mar 2026 16:10:26 +0100 Subject: [PATCH] =?UTF-8?q?il=20manque=20plus=20qu'a=20renvoyer=20l'adress?= =?UTF-8?q?e=20r=C3=A9seau?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/main.py b/main.py index f90d7a8..c86ec9b 100644 --- a/main.py +++ b/main.py @@ -5,15 +5,18 @@ import tkinter as tk def recup(): message = value.get() label.configure(text=message) + def reseau(adr,msq): - lstIP = strIP.split(".") - lstMasque = strmsq.split(".") + lstIP = adr.split(".") + lstMasque = msq.split(".") lstreseau = [' ']*4 for i in range(4): lstReseau[i] =str(lstIP[i])&int(lstMasque[i]) - -def affiche_res(): - value = ".".join(lstReseau) + return ".".join(lstReseau) + + + + #Creation de la fenetre fenetre =tk.Tk() fenetre.title("Calcul d'IP") @@ -22,9 +25,7 @@ canvas.grid() label =tk.Label(fenetre, text="Calcul de l'adresse réseau") label.grid() - - - +#Entrées et bouton valider value = tk.StringVar() value.set("Entrez votre adresse") adr=tk.Entry(fenetre, textvariable=value, width=20) @@ -40,14 +41,4 @@ bouton.grid() - - - - - - - - - - fenetre.mainloop() \ No newline at end of file