- # convert the lines to a Python list, pickle it and compress the result.
- lines = []
- for line in data[2:]: # skip the first two lines
- lines.append(line[1:-3]) # chop one char from the front and three from the end
-
- # chop one extra char from the last line
- lines[-1] = lines[-1][:-1]
-
- # pickle, crunch and convert it to a form suitable for embedding in code
- data = cPickle.dumps(lines)