On Fri, Mar 6, 2009 at 8:04 AM, Frank Wierzbicki <fwierzbicki@...> wrote:
> My question is: are there plans to implement the Python C API in Jython?
> On the face of it, this might seem pointless, since Jython presumably
> exists to connect to Java libraries, not to C libraries.
> However, consider the following situation: the popular public domain
> mathematical software SAGE (www.sagemath.org) is based on Python. I
> am part of a group that has developed a 3D Java scene graph package
> (www.jreality.de) which naturally runs under Jython. What would be
> nice is, if SAGE could also run under Jython, then it could use
> jReality for its 3D graphics. However, according to the SAGE wiki,
> this connection is not possible since "Jython does not support the
> Python C-API". (See message thread
> Hence my question.
There are no immediate plans to support the Python C-API in Jython.
However, if you are interested in this topic, a project to look at is
the Ironclad project (http://code.google.com/p/ironclad/). Ironclad
supports the C-API on IronPython.
I had a conversation the other day with Michael Foord
(http://www.voidspace.org.uk) about Ironclad. Micheal mentioned that
William Reade (Lead developer of Ironclad) intends to factor out a
core (the C + assembler) that could be reused by Jython and PyPy once
Ironclad is reasonably stable. Once that happens, the barriers to a
C-API in Jython drop substantially.
To read up on some of the gory details about how Ironclad supports the
C-API with all of it's reference counting semantics and locking on a
memory managed environment (C#) -- see
The same strategy should work on Jython when the time comes to look at
Don't ask for a timeframe though :)