import threading
import time
import graphs

print('oki')
def run():
    count = 0
    while count < 35:   
        time.sleep(2)
        count += 1
        # print('ok')
        localtime = time.localtime(time.time())
        czas = time.time()
        # print(str(localtime))
        graph = graphs.BarGraph('vbar')
        graph.values = [(234,116,300),(125,62),(281,144),(147,75),(190,80)]
        graph.titles =[str(localtime),"guma"]
        graph.labels =["fiif","guuf"]
        f1=open('.testfile4.html', 'w+')
        print(graph.create(), file=f1)
        
t=threading.Thread(target=run)
# t.daemon = True  # set thread to daemon ('ok' won't be printed in this case)
t.start()
