embedding jython in CPython...

Jim Hargrave jhargraveiii at msn.com
Sat Jan 22 22:34:55 EST 2005

Sorry - should have given more detail.  That's what I get for posting at 

What I want to do us write scripts in CPython that access Windows 
ActiveX such as Word and IE. Obviously Jython can't do this (easily at 
least). I also have Jython scripts that provide a high level layer on 
top of various Java libraries. I'd like to write as much code in Python 
as possible. But I have a mixture of incompatible CPython and Jython 
scripts - that's why I would like to embed Jython in CPython. If I can 
call my Jython scripts from CPython I can have the best of both world's!

Would I be able to embed Jython using JPype? The PyLucene approach 
(compile Java source with GCJ then wrap with SWIG) looks interesting - 
but complicated.

Here's an example of embedding Jython in a regular Java app:

Imagine doing the same in CPython, but with JPype or GCJ/SWIG.

More information about the Python-list mailing list