from tkinter import from testt import pings_list class Main Tk def __i

 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
from tkinter import *
from testt import *
pings_list = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
class Main(Tk):
def __init__(self):
Tk.__init__(self)
self.can = Canvas(self)
self.can.create_rectangle(0, 0, 10, 300, outline="#05f", fill="#05f", tag='1')
self.can.create_rectangle(10, 0, 20, 300, outline="#05f", fill="#05f", tag='2')
self.can.create_rectangle(20, 0, 30, 300, outline="#05f", fill="#05f", tag='3')
self.can.create_rectangle(30, 0, 40, 300, outline="#05f", fill="#05f", tag='4')
self.can.create_rectangle(40, 0, 50, 300, outline="#05f", fill="#05f", tag='5')
self.can.create_rectangle(50, 0, 60, 300, outline="#05f", fill="#05f", tag='6')
self.can.create_rectangle(60, 0, 70, 300, outline="#05f", fill="#05f", tag='7')
self.can.create_rectangle(70, 0, 80, 300, outline="#05f", fill="#05f", tag='8')
self.can.create_rectangle(80, 0, 90, 300, outline="#05f", fill="#05f", tag='9')
self.can.create_rectangle(90, 0, 100, 300, outline="#05f", fill="#05f", tag='10')
self.can.pack()
self.run()
def run(self):
list = make_list(pings_list)
self.can.coords('1', 0, 300-list[0], 10, 300)
self.can.coords('2', 10, 300-list[1], 20, 300)
self.can.coords('3', 20, 300-list[2], 30, 300)
self.can.coords('4', 30, 300-list[3], 40, 300)
self.can.coords('5', 40, 300-list[4], 50, 300)
self.can.coords('6', 50, 300-list[5], 60, 300)
self.can.coords('7', 60, 300-list[6], 70, 300)
self.can.coords('8', 70, 300-list[7], 80, 300)
self.can.coords('9', 80, 300-list[8], 90, 300)
self.can.coords('10', 90, 300-list[9], 100, 300)
self.after(1000, self.run)
m = Main()
m.mainloop()