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.
56 lines
1.2 KiB
56 lines
1.2 KiB
sudo apt-get install python-tk
|
|
import tkinter as tk
|
|
from tkinter import* # Importe la librairie tkinter
|
|
|
|
# coding: utf-8
|
|
|
|
from tkinter import *
|
|
|
|
def fenetre = Tk()
|
|
|
|
def label = Label(fenetre, text="prévision consomation energetique")
|
|
label.pack()
|
|
|
|
def fenetre.mainloop()
|
|
# bouton de sortie
|
|
def bouton=Button(fenetre, text="Fermer", command=fenetre.quit)
|
|
|
|
def bouton = tk.Button(
|
|
fenetre,
|
|
text="jour ?",
|
|
command=donne_le_jour_d_aujourdhui
|
|
|
|
import (pic-journalier-consommation-brute-2023(1).txt) as fichier
|
|
from Téléchargements import pic-journalier-consommation-brute-2023(1).csv
|
|
|
|
|
|
|
|
|
|
def bissextile(année):
|
|
if année = bissextile (=366 jours)
|
|
return True bissextile
|
|
else:
|
|
return False normal
|
|
def normal
|
|
if année= normal (=365 jours)
|
|
return True normal
|
|
else:
|
|
return False bissextile
|
|
|
|
|
|
def lecture (donne un tableau avec pic-journalier-consommation-brute-2023(3).csv)
|
|
lecture pic-journalier-consommation-brute-2023(3).csv
|
|
tuple (numero du jour)
|
|
tuple (température moyenne)
|
|
tuple (temperature reference)
|
|
|
|
|
|
def numerojour ( "aaaa-mm-jj" de pic-journalier-consommation-brute-2023(3).csv)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|