I'm quite new to programming and I got the task to create a temperature overview program. I decided to create a calendar to easily overview every month. Every day in the month that I am view should read a text file for the specific day. It should count the lines there were made and count a specific value and above to get a percentage. With that percentage we could add red in the background of the specific day. On click it should open an graph program with exact that file, I already programmed
Now I'm stuck at that the program should find those days I am viewing to begin to read the text files to calculate the "red" color.
Here is the code so far:
PS: My coding knowledge is based on about 4 days...
from tkinter import *
from tkcalendar import *
import tkcalendar
import tkinter
from tkinter import messagebox
from datetime import date
#root =Tk()
def cal_func():
def calval():
de = DateEntry
tag = 1
counter = 0
for i in range(1, 31):
#??????
counter + 1
cal = Calendar(
background="grey",
normalbackground="white",
font="Arial 20",
weekendbackground="lightgray",
selectmode="day",
year=date.today().year,
month=date.today().month,
day=date.today().day
)
cal.pack(expand=True, fill="both")
btn3 = Button(text="Aktualisieren", command=calval)
btn3.pack()
cal_func()
mainloop()