From fc5e83435099d2a20648d86e2497d34f13703a2f Mon Sep 17 00:00:00 2001 From: VincentLeduc Date: Sat, 5 Aug 2017 23:38:14 +0200 Subject: [PATCH] Ajout icone --- Auth/login.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/Auth/login.py b/Auth/login.py index cffe39a..e32c662 100644 --- a/Auth/login.py +++ b/Auth/login.py @@ -1,8 +1,14 @@ # -*-coding:utf8 -* """Affichage de la fenêtre de login""" from __future__ import unicode_literals +import sys +import os +DOSSIER_COURRANT = os.path.dirname(os.path.abspath(__file__)) +DOSSIER_PARENT = os.path.dirname(DOSSIER_COURRANT) +sys.path.append(DOSSIER_PARENT) from tkinter import * -import Auth.authentication as auth +import Auth.authentification as auth +from PIL import Image,ImageTk class Login(): """Classe gérant l'affichage de la fenêtre de login""" @@ -11,8 +17,13 @@ class Login(): def __init__(self): self.fenetre = Tk() + self.fenetre.title('login') - + try: + self.fenetre.iconbitmap("..\\icon.ico") + except Exception: + self.fenetre.iconbitmap("icon.ico") + # Création de nos widgets self.message = Label(self.fenetre, text="Merci de vous identifier") self.message.pack() @@ -38,3 +49,4 @@ class Login(): if auth.Auth.access == True: self.fenetre.destroy() +