PTE.py 21.7 KB
Newer Older
1
import Tkinter as tk
2
from PTEdict import *
3
from numpy import arange
4 5

####################################################
6 7
# PTE building

8
def PTable(Elem , Elembut, Labentrys):
9 10 11 12 13 14 15 16 17 18 19

    ####################################################
    # Returns element parameters on click

    def atomdef(atom, Ele, Eleb):
        Eleb['text'] = atom['symbol']
        Ele['name'] = atom['name']
        Ele['mass'] = atom['mass']
        Ele['Z'] = atom['Z']
        Ele['symbol'] = atom['symbol']
        master.destroy()
20
        
21 22 23 24
        Labentrys[0].configure(text = '%s' %atom['name'])
        Labentrys[1].configure(text = 'Mass - %f' %atom['mass'])
        Labentrys[2].configure(text = 'Z - %f' %atom['Z'])
        Labentrys[3].configure(text = 'Symbol - %s' %atom['symbol'])
25

26 27
        for i in arange(6,10):
            Labentrys[i].delete (0, len(Labentrys[i].get()))
28

29 30 31 32
        Labentrys[6].insert(0, atom['name'])
        Labentrys[7].insert(0, atom['mass'])
        Labentrys[8].insert(0, atom['Z'])
        Labentrys[9].insert(0, atom['symbol'])
33 34 35 36 37

    master = tk.Tk()
    master.title('Periodic Table of Elements')
    
    ####################################################
38
    # Buttons
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
    
    q1 = lambda: atomdef(H, Elem, Elembut)
    b1 = tk.Button(master, text="H", command=q1, width=1, height=1, bg='white')
    
    q2 = lambda: atomdef(He, Elem, Elembut)
    b2 = tk.Button(master, text="He", command=q2, width=1, height=1, bg='pink')
    
    q3 = lambda: atomdef(Li, Elem, Elembut)
    b3 = tk.Button(master, text="Li", command=q3, width=1, height=1, bg='yellow')
    
    q4 = lambda: atomdef(Be, Elem, Elembut)
    b4 = tk.Button(master, text="Be", command=q4, width=1, height=1, bg='brown')
    
    q5 = lambda: atomdef(B, Elem, Elembut)
    b5 = tk.Button(master, text="B", command=q5, width=1, height=1, bg='blue')
    
    q6 = lambda: atomdef(C, Elem, Elembut)
    b6 = tk.Button(master, text="C", command=q6, width=1, height=1, bg='green')
    
    q7 = lambda: atomdef(N, Elem, Elembut)
    b7 = tk.Button(master, text="N", command=q7, width=1, height=1, bg='green')
    
    q8 = lambda: atomdef(O, Elem, Elembut)
    b8 = tk.Button(master, text="O", command=q8, width=1, height=1, bg='green')
    
    q9 = lambda: atomdef(F, Elem, Elembut)  
    b9 = tk.Button(master, text="F", command=q9, width=1, height=1, bg='red')
    
    q10 = lambda: atomdef(Ne, Elem, Elembut)
    b10 = tk.Button(master, text="Ne", command=q10, width=1, height=1, bg='pink')

    q11 = lambda: atomdef(Na, Elem, Elembut)
    b11 = tk.Button(master, text="Na", command=q11, width=1, height=1, bg='yellow')

    q12 = lambda: atomdef(Mg, Elem, Elembut)
    b12 = tk.Button(master, text="Mg", command=q12, width=1, height=1, bg='brown')
75
 
76 77
    q13 = lambda: atomdef(Al, Elem, Elembut)
    b13 = tk.Button(master, text="Al", command=q13, width=1, height=1, bg='purple')
78

79 80
    q14 = lambda: atomdef(Si, Elem, Elembut)
    b14 = tk.Button(master, text="Si", command=q14, width=1, height=1, bg='blue')
81

82 83
    q15 = lambda: atomdef(P, Elem, Elembut)
    b15 = tk.Button(master, text="P", command=q15, width=1, height=1, bg='green')
84

85 86
    q16 = lambda: atomdef(S, Elem, Elembut)
    b16 = tk.Button(master, text="S", command=q16, width=1, height=1, bg='green')
87

88 89
    q17 = lambda: atomdef(Cl, Elem, Elembut)
    b17 = tk.Button(master, text="Cl", command=q17, width=1, height=1, bg='red')
90

91 92
    q18 = lambda: atomdef(Ar, Elem, Elembut)
    b18 = tk.Button(master, text="Ar", command=q18, width=1, height=1, bg='pink')
93

94 95
    q19 = lambda: atomdef(K, Elem, Elembut)
    b19 = tk.Button(master, text="K", command=q19, width=1, height=1, bg='yellow')
96

97 98
    q20 = lambda: atomdef(Ca, Elem, Elembut)
    b20 = tk.Button(master, text="Ca", command=q20, width=1, height=1, bg='brown')
99

100 101
    q21 = lambda: atomdef(Sc, Elem, Elembut)
    b21 = tk.Button(master, text="Sc", command=q21, width=1, height=1)
102

103 104
    q22 = lambda: atomdef(Ti, Elem, Elembut)
    b22 = tk.Button(master, text="Ti", command=q22, width=1, height=1)
105

106 107
    q23 = lambda: atomdef(V, Elem, Elembut)
    b23 = tk.Button(master, text="V", command=q23, width=1, height=1)
108

109 110
    q24 = lambda: atomdef(Cr, Elem, Elembut)
    b24 = tk.Button(master, text="Cr", command=q24, width=1, height=1)
111

112 113
    q25 = lambda: atomdef(Mn, Elem, Elembut)
    b25 = tk.Button(master, text="Mn", command=q25, width=1, height=1)
114
 
115 116
    q26 = lambda: atomdef(Fe, Elem, Elembut)
    b26 = tk.Button(master, text="Fe", command=q26, width=1, height=1)
117

118 119
    q27 = lambda: atomdef(Co, Elem, Elembut)
    b27 = tk.Button(master, text="Co", command=q27, width=1, height=1)
120

121 122
    q28 = lambda: atomdef(Ni, Elem, Elembut)
    b28 = tk.Button(master, text="Ni", command=q28, width=1, height=1)
123

124 125
    q29 = lambda: atomdef(Cu, Elem, Elembut)
    b29 = tk.Button(master, text="Cu", command=q29, width=1, height=1)
126

127 128
    q30 = lambda: atomdef(Zn, Elem, Elembut)
    b30 = tk.Button(master, text="Zn", command=q30, width=1, height=1)
129

130 131
    q31 = lambda: atomdef(Ga, Elem, Elembut)
    b31 = tk.Button(master, text="Ga", command=q31, width=1, height=1, bg='purple')
132

133 134
    q32 = lambda: atomdef(Ge, Elem, Elembut)
    b32 = tk.Button(master, text="Ge", command=q32, width=1, height=1, bg='blue')
135

136 137
    q33 = lambda: atomdef(As, Elem, Elembut)
    b33 = tk.Button(master, text="As", command=q33, width=1, height=1, bg='blue')
138

139 140
    q34 = lambda: atomdef(Se, Elem, Elembut)
    b34 = tk.Button(master, text="Se", command=q34, width=1, height=1, bg='green')
141

142 143
    q35 = lambda: atomdef(Br, Elem, Elembut)
    b35 = tk.Button(master, text="Br", command=q35, width=1, height=1, bg='red')
144

145 146
    q36 = lambda: atomdef(Kr, Elem, Elembut)
    b36 = tk.Button(master, text="Kr", command=q36, width=1, height=1, bg='pink')
147

148 149
    q37 = lambda: atomdef(Rb, Elem, Elembut)
    b37 = tk.Button(master, text="Rb", command=q37, width=1, height=1, bg='yellow')
150

151 152
    q38 = lambda: atomdef(Sr, Elem, Elembut)
    b38 = tk.Button(master, text="Sr", command=q38, width=1, height=1, bg='brown')
153
 
154 155
    q39 = lambda: atomdef(Y, Elem, Elembut)
    b39 = tk.Button(master, text="Y", command=q39, width=1, height=1)
156

157 158
    q40 = lambda: atomdef(Zr, Elem, Elembut)
    b40 = tk.Button(master, text="Zr", command=q40, width=1, height=1)
159

160 161
    q41 = lambda: atomdef(Nb, Elem, Elembut)
    b41 = tk.Button(master, text="Nb", command=q41, width=1, height=1)
162

163 164
    q42 = lambda: atomdef(Mo, Elem, Elembut)
    b42 = tk.Button(master, text="Mo", command=q42, width=1, height=1)
165

166 167
    q43 = lambda: atomdef(Tc, Elem, Elembut)
    b43 = tk.Button(master, text="Tc", command=q43, width=1, height=1)
168

169 170
    q44 = lambda: atomdef(Ru, Elem, Elembut)
    b44 = tk.Button(master, text="Ru", command=q44, width=1, height=1)
171

172 173
    q45 = lambda: atomdef(Rh, Elem, Elembut)
    b45 = tk.Button(master, text="Rh", command=q45, width=1, height=1)
174

175 176
    q46 = lambda: atomdef(Pd, Elem, Elembut)
    b46 = tk.Button(master, text="Pd", command=q46, width=1, height=1)
177

178 179
    q47 = lambda: atomdef(Ag, Elem, Elembut)
    b47 = tk.Button(master, text="Ag", command=q47, width=1, height=1)
180

181 182
    q48 = lambda: atomdef(Cd, Elem, Elembut)
    b48 = tk.Button(master, text="Cd", command=q48, width=1, height=1)
183
 
184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206
    q49 = lambda: atomdef(In, Elem, Elembut)
    b49 = tk.Button(master, text="In", command=q49, width=1, height=1, bg='purple')

    q50 = lambda: atomdef(Sn, Elem, Elembut)
    b50 = tk.Button(master, text="Sn", command=q50, width=1, height=1, bg='purple')    
    
    q51 = lambda: atomdef(Sb, Elem, Elembut)
    b51 = tk.Button(master, text="Sb", command=q51, width=1, height=1, bg='blue')

    q52 = lambda: atomdef(Te, Elem, Elembut)
    b52 = tk.Button(master, text="Te", command=q52, width=1, height=1, bg='blue')

    q53 = lambda: atomdef(I, Elem, Elembut)
    b53 = tk.Button(master, text="I", command=q53, width=1, height=1, bg='red')

    q54 = lambda: atomdef(Xe, Elem, Elembut)
    b54 = tk.Button(master, text="Xe", command=q54, width=1, height=1, bg='pink')

    q55 = lambda: atomdef(Cs, Elem, Elembut)
    b55 = tk.Button(master, text="Cs", command=q55, width=1, height=1, bg='yellow')

    q56 = lambda: atomdef(Ba, Elem, Elembut)
    b56 = tk.Button(master, text="Ba", command=q56, width=1, height=1, bg='brown')
207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236
    
    q57 = lambda: atomdef(La, Elem, Elembut)
    b57 = tk.Button(master, text="La", command=q57, width=1, height=1, bg='grey')
    
    q58 = lambda: atomdef(Ce, Elem, Elembut)
    b58 = tk.Button(master, text="Ce", command=q58, width=1, height=1, bg='grey')
    
    q59 = lambda: atomdef(Pr, Elem, Elembut)
    b59 = tk.Button(master, text="Pr", command=q59, width=1, height=1, bg='grey')
    
    q60 = lambda: atomdef(Nd, Elem, Elembut)
    b60 = tk.Button(master, text="Nd", command=q60, width=1, height=1, bg='grey')
    
    q61 = lambda: atomdef(Pm, Elem, Elembut)
    b61 = tk.Button(master, text="Pm", command=q61, width=1, height=1, bg='grey')
    
    q62 = lambda: atomdef(Sm, Elem, Elembut)
    b62 = tk.Button(master, text="Sm", command=q62, width=1, height=1, bg='grey')
    
    q63 = lambda: atomdef(Eu, Elem, Elembut)
    b63 = tk.Button(master, text="Eu", command=q63, width=1, height=1, bg='grey')
    
    q64 = lambda: atomdef(Gd, Elem, Elembut)
    b64 = tk.Button(master, text="Gd", command=q64, width=1, height=1, bg='grey')
    
    q65 = lambda: atomdef(Tb, Elem, Elembut)  
    b65 = tk.Button(master, text="Tb", command=q65, width=1, height=1, bg='grey')
    
    q66 = lambda: atomdef(Dy, Elem, Elembut)
    b66 = tk.Button(master, text="Dy", command=q66, width=1, height=1, bg='grey')
237

238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356
    q67 = lambda: atomdef(Ho, Elem, Elembut)
    b67 = tk.Button(master, text="Ho", command=q67, width=1, height=1, bg='grey')

    q68 = lambda: atomdef(Er, Elem, Elembut)
    b68 = tk.Button(master, text="Er", command=q68, width=1, height=1, bg='grey')
 
    q69 = lambda: atomdef(Tm, Elem, Elembut)
    b69 = tk.Button(master, text="Tm", command=q69, width=1, height=1, bg='grey')

    q70 = lambda: atomdef(Yb, Elem, Elembut)
    b70 = tk.Button(master, text="Yb", command=q70, width=1, height=1, bg='grey')

    q71 = lambda: atomdef(Lu, Elem, Elembut)
    b71 = tk.Button(master, text="Lu", command=q71, width=1, height=1, bg='grey')

    q72 = lambda: atomdef(Hf, Elem, Elembut)
    b72 = tk.Button(master, text="Hf", command=q72, width=1, height=1)

    q73 = lambda: atomdef(Ta, Elem, Elembut)
    b73 = tk.Button(master, text="Ta", command=q73, width=1, height=1)

    q74 = lambda: atomdef(W, Elem, Elembut)
    b74 = tk.Button(master, text="W", command=q74, width=1, height=1)

    q75 = lambda: atomdef(Re, Elem, Elembut)
    b75 = tk.Button(master, text="Re", command=q75, width=1, height=1)

    q76 = lambda: atomdef(Os, Elem, Elembut)
    b76 = tk.Button(master, text="Os", command=q76, width=1, height=1)

    q77 = lambda: atomdef(Ir, Elem, Elembut)
    b77 = tk.Button(master, text="Ir", command=q77, width=1, height=1)

    q78 = lambda: atomdef(Pt, Elem, Elembut)
    b78 = tk.Button(master, text="Pt", command=q78, width=1, height=1)

    q79 = lambda: atomdef(Au, Elem, Elembut)
    b79 = tk.Button(master, text="Au", command=q79, width=1, height=1)

    q80 = lambda: atomdef(Hg, Elem, Elembut)
    b80 = tk.Button(master, text="Hg", command=q80, width=1, height=1)

    q81 = lambda: atomdef(Tl, Elem, Elembut)
    b81 = tk.Button(master, text="Tl", command=q81, width=1, height=1, bg='purple')
 
    q82 = lambda: atomdef(Pb, Elem, Elembut)
    b82 = tk.Button(master, text="Pb", command=q82, width=1, height=1, bg='purple')

    q83 = lambda: atomdef(Bi, Elem, Elembut)
    b83 = tk.Button(master, text="Bi", command=q83, width=1, height=1, bg='purple')

    q84 = lambda: atomdef(Po, Elem, Elembut)
    b84 = tk.Button(master, text="Po", command=q84, width=1, height=1, bg='blue')

    q85 = lambda: atomdef(At, Elem, Elembut)
    b85 = tk.Button(master, text="At", command=q85, width=1, height=1, bg='red')

    q86 = lambda: atomdef(Rn, Elem, Elembut)
    b86 = tk.Button(master, text="Rn", command=q86, width=1, height=1, bg='pink')

    q87 = lambda: atomdef(Fr, Elem, Elembut)
    b87 = tk.Button(master, text="Fr", command=q87, width=1, height=1, bg='yellow')

    q88 = lambda: atomdef(Ra, Elem, Elembut)
    b88 = tk.Button(master, text="Ra", command=q88, width=1, height=1, bg='brown')

    q89 = lambda: atomdef(Ac, Elem, Elembut)
    b89 = tk.Button(master, text="Ac", command=q89, width=1, height=1, bg='grey')

    q90 = lambda: atomdef(Th, Elem, Elembut)
    b90 = tk.Button(master, text="Th", command=q90, width=1, height=1, bg='grey')

    q91 = lambda: atomdef(Pa, Elem, Elembut)
    b91 = tk.Button(master, text="Pa", command=q91, width=1, height=1, bg='grey')

    q92 = lambda: atomdef(U, Elem, Elembut)
    b92 = tk.Button(master, text="U", command=q92, width=1, height=1, bg='grey')

    q93 = lambda: atomdef(Np, Elem, Elembut)
    b93 = tk.Button(master, text="Np", command=q93, width=1, height=1, bg='grey')

    q94 = lambda: atomdef(Pu, Elem, Elembut)
    b94 = tk.Button(master, text="Pu", command=q94, width=1, height=1, bg='grey')
 
    q95 = lambda: atomdef(Am, Elem, Elembut)
    b95 = tk.Button(master, text="Am", command=q95, width=1, height=1, bg='grey')

    q96 = lambda: atomdef(Cm, Elem, Elembut)
    b96 = tk.Button(master, text="Cm", command=q96, width=1, height=1, bg='grey')

    q97 = lambda: atomdef(Bk, Elem, Elembut)
    b97 = tk.Button(master, text="Bk", command=q97, width=1, height=1, bg='grey')

    q98 = lambda: atomdef(Cf, Elem, Elembut)
    b98 = tk.Button(master, text="Cf", command=q98, width=1, height=1, bg='grey')

    q99 = lambda: atomdef(Es, Elem, Elembut)
    b99 = tk.Button(master, text="Es", command=q99, width=1, height=1, bg='grey')

    q100 = lambda: atomdef(Fm, Elem, Elembut)
    b100 = tk.Button(master, text="Fm", command=q100, width=1, height=1, bg='grey')

    q101 = lambda: atomdef(Md, Elem, Elembut)
    b101 = tk.Button(master, text="Md", command=q101, width=1, height=1, bg='grey')

    q102 = lambda: atomdef(No, Elem, Elembut)
    b102 = tk.Button(master, text="No", command=q102, width=1, height=1, bg='grey')

    q103 = lambda: atomdef(Lr, Elem, Elembut)
    b103 = tk.Button(master, text="Lr", command=q103, width=1, height=1, bg='grey')

    q104 = lambda: atomdef(Rf, Elem, Elembut)
    b104 = tk.Button(master, text="Rf", command=q104, width=1, height=1)
 
    q105 = lambda: atomdef(Db, Elem, Elembut)
    b105 = tk.Button(master, text="Db", command=q105, width=1, height=1)

    q106 = lambda: atomdef(Sg, Elem, Elembut)
    b106 = tk.Button(master, text="Sg", command=q106, width=1, height=1)    
357
    
358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396
    q107 = lambda: atomdef(Bh, Elem, Elembut)
    b107 = tk.Button(master, text="Bh", command=q107, width=1, height=1)

    q108 = lambda: atomdef(Hs, Elem, Elembut)
    b108 = tk.Button(master, text="Hs", command=q108, width=1, height=1)

    q109 = lambda: atomdef(Mt, Elem, Elembut)
    b109 = tk.Button(master, text="Mt", command=q109, width=1, height=1)

    q110 = lambda: atomdef(Ds, Elem, Elembut)
    b110 = tk.Button(master, text="Ds", command=q110, width=1, height=1)

    q111 = lambda: atomdef(Rg, Elem, Elembut)
    b111 = tk.Button(master, text="Rg", command=q111, width=1, height=1)

    q112 = lambda: atomdef(Cn, Elem, Elembut)
    b112 = tk.Button(master, text="Cn", command=q112, width=1, height=1)
    
    q113 = lambda: atomdef(Uut, Elem, Elembut)
    b113 = tk.Button(master, text="Uut", command=q113, width=1, height=1, bg='purple')

    q114 = lambda: atomdef(Uuq, Elem, Elembut)
    b114 = tk.Button(master, text="Uuq", command=q114, width=1, height=1, bg='purple')

    q115 = lambda: atomdef(Uup, Elem, Elembut)
    b115 = tk.Button(master, text="Uup", command=q115, width=1, height=1, bg='purple')

    q116 = lambda: atomdef(Uuh, Elem, Elembut)
    b116 = tk.Button(master, text="Uuh", command=q116, width=1, height=1, bg='purple')

    q117 = lambda: atomdef(Uus, Elem, Elembut)
    b117 = tk.Button(master, text="Uus", command=q117, width=1, height=1, bg='purple')

    q118 = lambda: atomdef(Uuo, Elem, Elembut)
    b118 = tk.Button(master, text="Uuo", command=q118, width=1, height=1, bg='purple')

    null1 = tk.Button(master, text="*", width=1, height=1, relief = 'flat')
    null2 = tk.Button(master, text="*", width=1, height=1, relief = 'flat')
    null3 = tk.Button(master, text="**", width=1, height=1, relief = 'flat')
397
    null4 = tk.Button(master, text="**", width=1, height=1, relief = 'flat') 
398 399 400 401
 
    ####################################################
    # Grid

402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457
    b1.grid(row=0, column=0, padx=1, pady=1)
    b2.grid(row=0, column=17, padx=1, pady=1)
    b3.grid(row=1, column=0, padx=1, pady=1)
    b4.grid(row=1, column=1, padx=1, pady=1)
    b5.grid(row=1, column=12, padx=1, pady=1)
    b6.grid(row=1, column=13, padx=1, pady=1)
    b7.grid(row=1, column=14, padx=1, pady=1)
    b8.grid(row=1, column=15, padx=1, pady=1)
    b9.grid(row=1, column=16, padx=1, pady=1)
    b10.grid(row=1, column=17, padx=1, pady=1)
    b11.grid(row=2, column=0, padx=1, pady=1)
    b12.grid(row=2, column=1, padx=1, pady=1)
    b13.grid(row=2, column=12, padx=1, pady=1)
    b14.grid(row=2, column=13, padx=1, pady=1)
    b15.grid(row=2, column=14, padx=1, pady=1)
    b16.grid(row=2, column=15, padx=1, pady=1)
    b17.grid(row=2, column=16, padx=1, pady=1)
    b18.grid(row=2, column=17, padx=1, pady=1)
    b19.grid(row=3, column=0, padx=1, pady=1)
    b20.grid(row=3, column=1, padx=1, pady=1)
    b21.grid(row=3, column=2, padx=1, pady=1)
    b22.grid(row=3, column=3, padx=1, pady=1)
    b23.grid(row=3, column=4, padx=1, pady=1)
    b24.grid(row=3, column=5, padx=1, pady=1)
    b25.grid(row=3, column=6, padx=1, pady=1)
    b26.grid(row=3, column=7, padx=1, pady=1)
    b27.grid(row=3, column=8, padx=1, pady=1)
    b28.grid(row=3, column=9, padx=1, pady=1)
    b29.grid(row=3, column=10, padx=1, pady=1)
    b30.grid(row=3, column=11, padx=1, pady=1)
    b31.grid(row=3, column=12, padx=1, pady=1)
    b32.grid(row=3, column=13, padx=1, pady=1)
    b33.grid(row=3, column=14, padx=1, pady=1)
    b34.grid(row=3, column=15, padx=1, pady=1)
    b35.grid(row=3, column=16, padx=1, pady=1)
    b36.grid(row=3, column=17, padx=1, pady=1)
    b37.grid(row=4, column=0, padx=1, pady=1)
    b38.grid(row=4, column=1, padx=1, pady=1)
    b39.grid(row=4, column=2, padx=1, pady=1)
    b40.grid(row=4, column=3, padx=1, pady=1)
    b41.grid(row=4, column=4, padx=1, pady=1)
    b42.grid(row=4, column=5, padx=1, pady=1)
    b43.grid(row=4, column=6, padx=1, pady=1)
    b44.grid(row=4, column=7, padx=1, pady=1)
    b45.grid(row=4, column=8, padx=1, pady=1)
    b46.grid(row=4, column=9, padx=1, pady=1)
    b47.grid(row=4, column=10, padx=1, pady=1)
    b48.grid(row=4, column=11, padx=1, pady=1)
    b49.grid(row=4, column=12, padx=1, pady=1)
    b50.grid(row=4, column=13, padx=1, pady=1)
    b51.grid(row=4, column=14, padx=1, pady=1)
    b52.grid(row=4, column=15, padx=1, pady=1)
    b53.grid(row=4, column=16, padx=1, pady=1)
    b54.grid(row=4, column=17, padx=1, pady=1)
    b55.grid(row=5, column=0, padx=1, pady=1)
    b56.grid(row=5, column=1, padx=1, pady=1)
458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519
    b57.grid(row=7, column=2, padx=1, pady=1)
    b58.grid(row=7, column=3, padx=1, pady=1)
    b59.grid(row=7, column=4, padx=1, pady=1)
    b60.grid(row=7, column=5, padx=1, pady=1)
    b61.grid(row=7, column=6, padx=1, pady=1)
    b62.grid(row=7, column=7, padx=1, pady=1)
    b63.grid(row=7, column=8, padx=1, pady=1)
    b64.grid(row=7, column=9, padx=1, pady=1)
    b65.grid(row=7, column=10, padx=1, pady=1)
    b66.grid(row=7, column=11, padx=1, pady=1)
    b67.grid(row=7, column=12, padx=1, pady=1)
    b68.grid(row=7, column=13, padx=1, pady=1)
    b69.grid(row=7, column=14, padx=1, pady=1)
    b70.grid(row=7, column=15, padx=1, pady=1)
    b71.grid(row=7, column=16, padx=1, pady=1)
    b72.grid(row=5, column=3, padx=1, pady=1)
    b73.grid(row=5, column=4, padx=1, pady=1)
    b74.grid(row=5, column=5, padx=1, pady=1)
    b75.grid(row=5, column=6, padx=1, pady=1)
    b76.grid(row=5, column=7, padx=1, pady=1)
    b77.grid(row=5, column=8, padx=1, pady=1)
    b78.grid(row=5, column=9, padx=1, pady=1)
    b79.grid(row=5, column=10, padx=1, pady=1)
    b80.grid(row=5, column=11, padx=1, pady=1)
    b81.grid(row=5, column=12, padx=1, pady=1)
    b82.grid(row=5, column=13, padx=1, pady=1)
    b83.grid(row=5, column=14, padx=1, pady=1)
    b84.grid(row=5, column=15, padx=1, pady=1)
    b85.grid(row=5, column=16, padx=1, pady=1)
    b86.grid(row=5, column=17, padx=1, pady=1)
    b87.grid(row=6, column=0, padx=1, pady=1)
    b88.grid(row=6, column=1, padx=1, pady=1)
    b89.grid(row=8, column=2, padx=1, pady=1)
    b90.grid(row=8, column=3, padx=1, pady=1)
    b91.grid(row=8, column=4, padx=1, pady=1)
    b92.grid(row=8, column=5, padx=1, pady=1)
    b93.grid(row=8, column=6, padx=1, pady=1)
    b94.grid(row=8, column=7, padx=1, pady=1)
    b95.grid(row=8, column=8, padx=1, pady=1)
    b96.grid(row=8, column=9, padx=1, pady=1)
    b97.grid(row=8, column=10, padx=1, pady=1)
    b98.grid(row=8, column=11, padx=1, pady=1)
    b99.grid(row=8, column=12, padx=1, pady=1)
    b100.grid(row=8, column=13, padx=1, pady=1)
    b101.grid(row=8, column=14, padx=1, pady=1)
    b102.grid(row=8, column=15, padx=1, pady=1)
    b103.grid(row=8, column=16, padx=1, pady=1)
    b104.grid(row=6, column=3, padx=1, pady=1)
    b105.grid(row=6, column=4, padx=1, pady=1)
    b106.grid(row=6, column=5, padx=1, pady=1)
    b107.grid(row=6, column=6, padx=1, pady=1)
    b108.grid(row=6, column=7, padx=1, pady=1)
    b109.grid(row=6, column=8, padx=1, pady=1)
    b110.grid(row=6, column=9, padx=1, pady=1)
    b111.grid(row=6, column=10, padx=1, pady=1)
    b112.grid(row=6, column=11, padx=1, pady=1)
    b113.grid(row=6, column=12, padx=1, pady=1)
    b114.grid(row=6, column=13, padx=1, pady=1)
    b115.grid(row=6, column=14, padx=1, pady=1)
    b116.grid(row=6, column=15, padx=1, pady=1)
    b117.grid(row=6, column=16, padx=1, pady=1)
    b118.grid(row=6, column=17, padx=1, pady=1)
520
    
521 522 523 524 525
    null1.grid(row=5, column=2, padx=1, pady=1)
    null2.grid(row=7, column=1, padx=1, pady=1)
    null3.grid(row=6, column=2, padx=1, pady=1)
    null4.grid(row=8, column=1, padx=1, pady=1)

526
    ####################################################
527
 
528
    master.mainloop()
529