Install python as usual. Open the python interpreter and import some of the stuff you don't think you need.
import io, optparse, tarfile
Then the representation of the strmodule has its own way in it.
>>> tarfile
<module 'tarfile' from '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/tarfile.py'>
You can simply insert and delete all .pyfiles that you do not want in your installation.
, , Python.