So I've got a program where most of my time is spent building a complex dictionary that is the same for every execution. I tried printing out str(foobar) to a file and then pasted that into my program as a literal definition of foobar. That is much faster, but even with the spaces stripped out it is 72K and there is a 50K limit on the program file.
gzip would bring that string down to 20K characters, but the interpreter seems a little fussy about storing raw binary data in the .py file and I'm also not quite clear on how best to define foobar based would now be a string variable instead of a literal dictionary definition. eval? Pickle? Or am I venturing where angels fear to tread?