Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try:
- with open(name, mode='r') as csv_file:
- csv_reader=csv.reader(csv_file, delimiter=';')
- for row in csv_reader:
- # ?MPEC?
- # Tzco
- Tzco = Label(window, text=str(row[4])[0:4] + " [°C]", fg="black", bg="orange", font="none 12")
- Tzco.place(x=116, y=63)
- # Tzcoref
- Tzcoref = Label(window, text=str(row[5])[0:4] + " [°C]", fg="black", bg="orange", font="none 12")
- Tzcoref.place(x=206, y=63)
- # Fzm
- fzm = str("{0:.2f}".format(float(row[10][0:6]) * 80))
- Fzm = Label(window, text=str(fzm) + " [t/h]", fg="black", bg="green", font="none 12")
- Fzm.place(x=296, y=63)
- # Tzm
- Tzm = Label(window, text=str(row[6])[0:4] + " [°C]", fg="black", bg="orange", font="none 12")
- Tzm.place(x=396, y=63)
- # Tpm
- Tpm = Label(window, text=str(row[3])[0:4] + " [°C]", fg="black", bg="orange", font="none 12")
- Tpm.place(x=308, y=270)
- # Budynek 1
- # Tr
- Tr1 = Label(window, text=str(row[1])[0:4] + " [°C]", fg="black", bg="orange", font="none 12")
- Tr1.place(x=680, y=63)
- # TrSP
- TrSP1 = Label(window, text=str(row[9])[0:4] + " [°C]", fg="black", bg="orange", font="none 12")
- TrSP1.place(x=770, y=63)
- # Tpco
- Tpco1 = Label(window, text=str(row[2])[0:4] + " [°C]", fg="black", bg="orange", font="none 12")
- Tpco1.place(x=860, y=63)
- # Fco1
- fco1 = str("{0:.2f}".format(float(row[11][0:6]) * 40))
- Fco1 = Label(window, text=str(fzm) + " [t/h]", fg="black", bg="green", font="none 12")
- Fco1.place(x=950, y=63)
- # Budynek 2
- # Tr
- Tr1 = Label(window, text=str(row[1])[0:4] + " [°C]", fg="black", bg="orange", font="none 12")
- Tr1.place(x=687, y=450)
- # TrSP
- TrSP1 = Label(window, text=str(row[9])[0:4] + " [°C]", fg="black", bg="orange", font="none 12")
- TrSP1.place(x=777, y=450)
- # Tpco
- Tpco1 = Label(window, text=str(row[2])[0:4] + " [°C]", fg="black", bg="orange", font="none 12")
- Tpco1.place(x=867, y=450)
- # Fco1
- fco1 = str("{0:.2f}".format(float(row[11][0:6]) * 40))
- Fco1 = Label(window, text=str(fzm) + " [t/h]", fg="black", bg="green", font="none 12")
- Fco1.place(x=957, y=450)
- # Regulatory[%]
- # Um
- um = str("{0:.2f}".format(float(row[10][0:6]) * 100))
- Um = Label(window, text=um + " [%]", fg="black", bg="grey", font="none 12")
- Um.place(x=56, y=170)
- # Ub1
- um = str("{0:.2f}".format(float(row[11][0:6]) * 100))
- Um = Label(window, text=um + " [%]", fg="black", bg="grey", font="none 12")
- Um.place(x=462, y=170)
- # Ub2
- um = str("{0:.2f}".format(float(row[12][0:6]) * 100))
- Um = Label(window, text=um + " [%]", fg="black", bg="grey", font="none 12")
- Um.place(x=462, y=550)
- window.update()
- time.sleep(0.1)
- except EOFError:
- print("Unexpected EOF")
- except OSError:
- print("File not found")
- except:
- print("Unexpected Error ")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement