Bonjour et merci de prendre le temps de m'aider, dans le cadre de mon projet d'isn, je dois réaliser un programme mais malheureusement et pour une raison qui m'est inconnue, mon programme fonctionne sur certain pc mais pas sur d'autre, mon programme étant asser grand j'ai du découper certains partit.

code :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
 
from tkinter import *
import time 
from tkinter.messagebox import *
 
def NbsJ():
 
    global Lun
    global Mar
    global Mer
    global Jeu
    global Ven
    global Sam
    global Dim
 
    global Semaine
    Semaine=[IntVar(),IntVar(),IntVar(),IntVar(),IntVar(),IntVar(),IntVar()]
 
    jours=["Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi","Dimanche"]
 
    Lun=Checkbutton(F4, text=jours[0] , variable=Semaine[0], onvalue=1, offvalue=0, command=Semaine_Calc)
    Lun.pack(side=LEFT, expand="yes", fill="both")
 
    Mar=Checkbutton(F4, text=jours[1] , variable=Semaine[1], onvalue=1, offvalue=0, command=Semaine_Calc)
    Mar.pack(side=LEFT, expand="yes", fill="both")
 
    Mer=Checkbutton(F4, text=jours[2] , variable=Semaine[2], onvalue=1, offvalue=0, command=Semaine_Calc)
    Mer.pack(side=LEFT, expand="yes", fill="both")
 
    Jeu=Checkbutton(F4, text=jours[3] , variable=Semaine[3], onvalue=1, offvalue=0, command=Semaine_Calc)
    Jeu.pack(side=LEFT, expand="yes", fill="both")
 
    Ven=Checkbutton(F4, text=jours[4] , variable=Semaine[4], onvalue=1, offvalue=0, command=Semaine_Calc)
    Ven.pack(side=LEFT, expand="yes", fill="both")
 
    Sam=Checkbutton(F4, text=jours[5] , variable=Semaine[5], onvalue=1, offvalue=0, command=Semaine_Calc)
    Sam.pack(side=LEFT, expand="yes", fill="both")
 
    Dim=Checkbutton(F4, text=jours[6] , variable=Semaine[6], onvalue=1, offvalue=0, command=Semaine_Calc)
    Dim.pack(side=LEFT, expand="yes", fill="both")
 
 
def Semaine_Calc():
 
 
 
    global Lun
    global Mar
    global Mer
    global Jeu
    global Ven
    global Sam
    global Dim
    global Semaine
    global t
 
 
    SemaineCalc=(Semaine[0].get()+Semaine[1].get()+ Semaine[2].get()+Semaine[3].get()+Semaine[4].get()+Semaine[5].get()+Semaine[6].get())
    SemaineCalc2=[Semaine[0].get(), Semaine[1].get(), Semaine[2].get(), Semaine[3].get(), Semaine[4].get(), Semaine[5].get(), Semaine[6].get()]
    Jour=[Lun, Mar, Mer, Jeu, Ven, Sam, Dim]
 
    print(SemaineCalc)
 
 
    n=0
    o=0
    a=0
 
    if SemaineCalc==t:
 
        while n<7:
 
            if SemaineCalc2[n]==0:
                Jour[a].pack_forget()
                n=n+1
                a=a+1
                print(n)
                print(a)
            else:
                o=o+1
                print(o)
                n=n+1
                a=a+1
 
 
 
    else:
        print("nope")
Explication : Sur certains ordinateur, lorsque je sélectionne un checkbuttons, la variable SemaineCalc est bien égale à 1, lorsque j'en sélectionne deux checkbuttons la valeur est égale à deux..ect mais sur mon pc la valeur de SemaineCalc reste à 0 et je ne sais pas pourquoi, pourtant il s'agit de la même version que sur l'autre pc ou les valeurs s'additionne.
Merci de bien vouloir m'aider à résoudre ce probleme, cordialement Mister_Chafouin