Porting Python to non-pc platforms

Laurence Tratt laurie at eh.org
Tue Feb 22 22:24:28 CET 2000

m_garcia at my-deja.com wrote:

> I have a question regarding which source files
> (Modules,Objects,Parser,Python) are necessary to
> get a "bare-bones" python interpreter running on
> a non-pc platform. By non-pc I mean game console.
> In my case I would still like to be able to embed
> python in a C/C++ app and use it to execute
> scripts.

You have to take it on a platform by platform basis. You can get a genuinely
"bare bones" interpreter out of very little, but it won't do anything
really: you need to get most of the important looking stuff working to get
anything useful...

Basically you need to create a config.h file from the .in file (read through
it; it's fairly obvious, although it takes a little while to fill in by hand
on a non-Unix platform), and then kind of wing it from there (typical
problems involve changing #include lines, removing / editing the odd file
which just won't compile and then fiddling with the linking phase). I ported
Python to a totally non-POSiX platform in only a few hours, so it's not
difficult in general, but there's no guaranteed general way of doing it.
Sorry :)


More information about the Python-list mailing list