Advertisement
Guest User

Untitled

a guest
Apr 21st, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. def extractValues(fileLocation, outLocation):
  2. inFile = open(fileLocation, 'r')
  3. outFile = open(outLocation, 'w')
  4. for line in inFile:
  5. frame = ""
  6. size = ""
  7. currentIndex = line.find("Frame= ")
  8. c = ""
  9. while c is not 'Q':
  10. c = line[currentIndex]
  11. if c in "0123456789":
  12. frame += c
  13. currentIndex += 1
  14.  
  15. index1 = line.find("size=") + 5
  16. size = line[index1:]
  17. outFile.write("Frame: " + frame + " Size: " + size)
  18. outFile.write("\n")
  19. inFile.close()
  20. outFile.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement