Mercurial Hosting > traffic-intelligence
diff python/storage.py @ 514:1ba618fb0f70
corrected bug from merging and argument issue in display-trajectories
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Thu, 05 Jun 2014 17:50:42 -0400 |
parents | 935430b1d408 |
children | 1dced8932b08 |
line wrap: on
line diff
--- a/python/storage.py Wed Jun 04 10:57:09 2014 -0400 +++ b/python/storage.py Thu Jun 05 17:50:42 2014 -0400 @@ -385,13 +385,13 @@ return dataStrings def writeList(filename, l): - f = utils.openCheck(filename, 'w') + f = openCheck(filename, 'w') for x in l: f.write('{}\n'.format(x)) f.close() def loadListStrings(filename, commentChar = commentChar): - f = utils.openCheck(filename, 'r') + f = openCheck(filename, 'r') result = getLines(f, commentChar) f.close() return result @@ -424,7 +424,7 @@ and returns the list of Feature objects''' objects = [] - input = utils.openCheck(filename) + input = openCheck(filename) if not input: import sys sys.exit() @@ -489,9 +489,9 @@ '''Reads data from the trajectory data provided by NGSIM project and converts to our current format.''' if append: - out = utils.openCheck(outFile,'a') + out = openCheck(outFile,'a') else: - out = utils.openCheck(outFile,'w') + out = openCheck(outFile,'w') nObjectsPerType = [0,0,0] features = loadNgsimFile(inFile, sequenceNum) @@ -516,7 +516,7 @@ f.write(s+'\n') def writeTrajectoriesToCsv(filename, objects): - f = utils.openCheck(filename, 'w') + f = openCheck(filename, 'w') for i,obj in enumerate(objects): writePositionsToCsv(f, obj) f.close()