Get Python Without Batteries (Selected)

I really like the Python philosophy included in the "battery", but now I need to perform a thin installation with only the basic functions and some others that I would like to choose one at a time.

Is it possible to load Python only with selected modules?

+5
source share
5 answers

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.

+3

, /, (test, docs, tcl),

ActivePython PyWin32 ( tcl/tkinter - ).

PyInstaller .

+2

py2exe . Python script . , .

, py2exe, Python, .

+2
source

AFAIK it is impossible to load Python only with the selected modules, but after installation you can remove everything (read: libraries) that you don’t need (will never use JSON? Gone !, etc.).

+1
source

You can start with TinyPy and add what you need. However, TinyPy does not seem to be supported.

0
source

All Articles