small python implementation or python subset ?

Jean-Claude Wippler jcw at equi4.com
Thu Feb 10 06:47:46 EST 2000


Marc BRETTE wrote:
> 
> OK, to summarize all answer that has been dent to me :
> 
> 1/ On unix the python executable after source compilation seems not to
> be stripped. Performing a "strip python", I scaled my executable down
> to 300 k (instead of 1.3 M - but with almost no module, even the
> string implementation in C was not included).
> 
> 2/ The URL http://www.abo.fi/~iporres/python/ gives a way to reduce
> drastically python size. It provides a PDF document describing how to
> do this and a patch file to apply to Python 1.5.1 (I didn't try it,
> and don't know yet how to apply it, but it seems promising).
> 
> Thanks a lot for all your answers.
> 
> PS : For future keyword search : embedded python, reducing python,
> lightweight python.

You can add "SLOPPY" to that list - SourceLess One Package Python :)

I've been hacking away at creating a smaller Python core which can be
deeply embedded in various contexts.  It runs .pyc files, and is pretty
small (especially when upx-compressed, I'll save the conclusions for
when this stuff is ready for public consumption).

I invite everyone who has worked on this to send patches (or modified
sources, but please get in touch first, to avoid useless repetition).
End of this month, I'll integrate it all into a single patch set, ready
for evaluation and hopefully acceptance into the Python core as a set of
#ifdef's (like the current #define WITHOUT_COMPLEX).  No promises, but
I've brought this up and gotten a basic go-ahead from, eh, management :)

Alternately, if someone else is almost there, please step forward so
that we can exchange notes and get this stuff over and done with.

-- Jean-Claude

[MI5T]



More information about the Python-list mailing list