Bike-X  0.8
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
generateMockData.py
Go to the documentation of this file.
1 passiveMockDataFile = 'files/passive_mock.txt'
2 lineLength = 256
3 charRange = 256
4 
5 print 'Generating mock data to files: '
6 print passiveMockDataFile
7 
8 mockFile = open(passiveMockDataFile, "w")
9 
10 # Generates 'lineLength' characters per line with values between 0 and 'charRange'
11 # will do that from 0 to charRange and then from charRange to 0
12 for char in range(0, charRange):
13  for pos in range(0, lineLength):
14  mockFile.write(chr(char))
15  mockFile.write('\n')
16 
17 for char in reversed(range(0, charRange)):
18  for pos in range(0, lineLength):
19  mockFile.write(chr(char))
20  mockFile.write('\n')
21 
22 mockFile.close()