Hey, I just thought about something: I only need a list of all the modules in stdlib, and then I will automatically create a Python script that imports each of them โmanuallyโ, for example:
import re import math import time
And then turn it on with my program.
So now I need to easily format the list of all modules / packages in stdlib. Now, how do I get this?
UPDATE:
I got a list like this: I installed Python 2.6 on a virtual machine, then ran into IDLE:
import pkgutil stuff = [thing[1] for thing in pkgutil.iter_modules()] stuff.sort()
Then copy the output paste into my IDE and make a little script to write:
if False: import re import email import time
To the Python module that I import into my program.
It works! py2exe packs the entire stdlib.
UPDATE:
I created a package that does this. I would download it here, but since I donโt see the download button, you can get it from the project folder:
http://github.com/cool-RR/PythonTurtle/tree/master
In the src folder, the package is called almostimportstdlib and it is documented.
source share