Commit e0c03c2d authored by Thorfin89's avatar Thorfin89

Création du fichier rw_pupitre.py pour séparer la gestion de l'interface…

Création du fichier rw_pupitre.py pour séparer la gestion de l'interface graphique du fonctionnement de application
parent 718d1d1b
import tkinter as tk # Projet : WebRadioPi
from PIL import Image # Fichier : main.py
# Auteur : Daniel SAZERAT (thorfin89@free.fr)
# import ----------------------------------
from rw_pupitre import Pupitre
class Application(tk.Tk):
def __init__(self):
tk.Tk.__init__(self)
self.title("Web Radio Pi") # classes ---------------------------------
self.geometry("800x480") class Radio(Pupitre):
self.resizable(width=False, height=False)
def __init__(self):
super().__init__() # constructeur de la classe parente
pass
if __name__ == "__main__": app = Radio() # instancie l'application
app = Application() app.boucle()
app.mainloop()
# Projet : WebRadioPi
# Fichier : rw_pupitre.py
# Auteur : Daniel SAZERAT (thorfin89@free.fr)
# import ----------------------------------
import tkinter as tk
# classes ---------------------------------
class Pupitre:
def __init__(self):
self.root = tk.Tk() # fenêtre principale
self.root.title("Web Radio Pi")
self.root.geometry("800x480")
self.root.resizable(width=False, height=False)
def boucle(self):
self.root.mainloop()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment