fork download
  1. def next_line(F):
  2. line = F.readline().strip()
  3.  
  4. if line.find("%%EOF") == 0:
  5. return None
  6. elif (line == '') or (line.find('%') == 0):
  7. return next_line(F)
  8. else:
  9. return line
  10.  
  11. def parse(filename):
  12. with open(filename) as F:
  13. while True:
  14. line = next_line(F)
  15.  
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty