Hey, I just thought of something: I only need a list of all the modules in stdlib, and then I'll automatically generate a Python script that imports each of them "manually", like this:
import re
import math
import time
# ...
And then include that with my program.
So all I need now is an easily formatted list of all the modules/packages in stdlib. Now how do I get that?
UPDATE:
I got the list like this: I installed Python 2.6 on a virtual machine, then ran in IDLE:
import pkgutil
stuff = [thing[1] for thing in pkgutil.iter_modules()]
stuff.sort() # To make it easy to look through
print(stuff)
Then copy pasted the output into my IDE, and made a little script to write:
if False:
import re
import email
import time
# ...
Into a Python module which I import in my program.
It works! py2exe packs the entire stdlib.
UPDATE:
I created a package that does this. I would upload it here but since I don't see any upload button, you can get it off my project folder:
http://github.com/cool-RR/PythonTurtle/tree/master
It's in the folder src
, the package is called almostimportstdlib
and it's documented.