Advertisement
Guest User

Untitled

a guest
Jun 15th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. def getclasses():
  2.  
  3. cli = []
  4.  
  5. for fn in G_prognames:
  6.  
  7. st = open(G_homedir+fn,"r").read()
  8.  
  9. st = st.split("\n")
  10.  
  11. while st:
  12. xx = st.pop(0)
  13. if xx.lstrip()[0:9] == "G_classes" and xx.rstrip()[-3:] == '"""':
  14. while st:
  15. xx = st.pop(0)
  16. if xx.lstrip()[0:3] == '"""':
  17. break
  18. else:
  19. xx = xx.lstrip().rstrip()
  20. if xx and xx[0] != "#":
  21. cli.append(xx.lstrip().rstrip())
  22.  
  23. cli = removenullsfromlist(list(set(cli)))
  24.  
  25. cli = list(set(list(cli)))
  26.  
  27. return cli
  28.  
  29. #~ {'y_displ': 0, 'x_displ': 0, 'rect': (255, 136, 981, 595), 'y': 4, 'x': 0, 'dir': 0}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement