Advertisement
Guest User

Untitled

a guest
Jul 16th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.58 KB | None | 0 0
  1. def getall():
  2.     colors = []
  3.     content = filemanager.File.read("config/config.txt")
  4.     for line in content:
  5.         if "[Highlighting]" in line:
  6.             first_color_index = content.index(line) + 1
  7.             for i in range(first_color_index, ((len(content) - first_color_index))):
  8.                  if content[i] == "" or content[i] == None:
  9.                     end_color_index = content.index(content[i])
  10.     try:
  11.         for x in range(first_color_index, end_color_index):
  12.             colors.append(content[x])
  13.     except:
  14.         colors = None
  15.            
  16.     return colors
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement