from kandinsky import * from time import * code = '000000000000005c0000000c000c00287c287c28002c7e34000460380c40707c542c4000000c00000000384400004438000000281c280000103810000000c00000001010100000400000000040380400007c443c0000007c00000074545c000044547c0000387c2000005c54740000785470000004047c00007c547c00005c547c00000000000000d00000000020505000003030300000505020000004541c00386c647c1860182c3040007c547c003844444400007c444438007c544000007c1414003844445434007c10107c00007c000000407c0000007c284400007c4040007c3860107c7c0810207c3c4444443c007c140c00384444245c007c344c00004c54740000047c04003c4040403c04386038043c6010603c446c186c44000c700c000064544c00' def car(p, x, t): marge = 110 - 3*t for i in range(5): v = int("0x"+code[p + 2*i:p + 2*i + 2]) for j in range(8): coul = (0,255,255) if v>>j & 1 != 0 else (60,60,60) if x + t*i >= -t: fill_rect(x + t*i, marge + t*j, t - 1 ,t - 1, coul) def led(txt, t = 15): fill_rect(0,0,320,222,(0,0,0)) n = 1 txt = txt.upper() + " "*int(320/(6*t)) taille = len(txt) + 1 while True: x = 320 - 6*t*n aff = txt[:n] for i in range(n): pos = ord(aff[i]) - 32 if 0 <= pos < 59: car(10*pos, x + 6*t*i, t) else: car(0, x + 6*t*i, t) n = (n + 1) % taille sleep(0.1) led("Bonne rentree a tous !! Les vacances c'etait sympa mais ca manquait cruellement d'equations et de bugs informatiques ;-) ",6)