SHARE
TWEET

Untitled

a guest Apr 21st, 2017 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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()
RAW Paste Data
Top