Advertisement
Guest User

Untitled

a guest
Jul 16th, 2019
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.98 KB | None | 0 0
  1. for i in range(0, 9999):
  2. if i == i:
  3. z = i + 2
  4. z = z + float(0.20)
  5. z = str(z) + "0"
  6. a = i + 2
  7. a = a + float(0.36)
  8. if past_list[i] >= 60 * 60 * 24 * 56: # 56 days
  9. txt1.tag_add("red_line0", z, a)
  10. elif past_list[i] >= 60 * 60 * 24 * 28: # 28 days
  11. txt1.tag_add("red4000_line0", z, a)
  12. elif past_list[i] >= 60 * 60 * 24 * 14: # 14 days
  13. txt1.tag_add("orange_line0", z, a)
  14. elif past_list[i] >= 60 * 60 * 24 * 7: # 7 days
  15. txt1.tag_add("orange_yellow_line0", z, a)
  16. elif past_list[i] >= 60 * 60 * 24 * 5: # 5 days
  17. txt1.tag_add("yellow_line0", z, a)
  18. elif past_list[i] >= 60 * 60 * 24 * 1: # 1 day
  19. txt1.tag_add("lime_line0", z, a)
  20. elif past_list[i] >= 60 * 60 * 22: # 22 hours
  21. txt1.tag_add("light_green_line0", z, a)
  22. elif past_list[i] >= 60 * 60 * 2: # 2 hours
  23. txt1.tag_add("neon_green_line0", z, a)
  24. elif past_list[i] >= 0: # 0 hours
  25. txt1.tag_add("blue_line0", z, a)
  26. except IndexError:
  27. pass
  28. txt1.tag_config("blue_line0", background="black", foreground="#0000ff")
  29. txt1.tag_config("neon_green_line0", background="black", foreground="#39ff14")
  30. txt1.tag_config("light_green_line0", background="black", foreground="#90ee90")
  31. txt1.tag_config("lime_line0", background="black", foreground="#bfff00")
  32. txt1.tag_config("yellow_line0", background="black", foreground="#ffff00")
  33. txt1.tag_config("orange_yellow_line0", background="black", foreground="#f8d568")
  34. txt1.tag_config("orange_line0", background="black", foreground="#FFA500")
  35. txt1.tag_config("red4000_line0", background="black", foreground="#FF4000")
  36. txt1.tag_config("red_line0", background="black", foreground="#FF0000")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement