[Python-Dev] Platform extension for distutils on other interpreters than CPython

Maciej Fijalkowski fijall at gmail.com
Wed Feb 24 18:21:39 CET 2010

On Wed, Feb 24, 2010 at 6:35 AM, Nick Coghlan <ncoghlan at gmail.com> wrote:
> Tarek Ziadé wrote:
>> That makes me wonder : why don't we have a sys.implementation variable ?
>> (cython/jython/pypi), since we can have several values for cython in
>> sys.platform


So I propose to have a sys.implementation which would have string
representation like "CPython" or "Jython" and have a couple of extra
attributes on that. I can think about a lot of attributes, however,
couple comes to mind as obvious.

* supports_c_api - whether it can load and use CPython C modules
* gc_strategy - probably equals "refcounting" or not, useful for some people
* frame_introspection - This is mostly True for everybody except
IronPython which has it as an optional command line argument. Might be
useful to have it for some projects, unsure.

What do you think?

I'm willing to implement this for CPython and PyPy (this should be
dead-simple anyway).


More information about the Python-Dev mailing list