[Python-Dev] Python + Java Integration

Chas Emerick cemerick at snowtide.com
Wed Aug 23 17:11:32 CEST 2006


This may seem like it's coming out of left field for a minute, but  
bear with me.

There is no doubt that Ruby's success is a concern for anyone who  
sees it as diminishing Python's status.  One of the reasons for  
Ruby's success is certainly the notion (originally advocated by Bruce  
Tate, if I'm not mistaken) that it is the "next Java" -- the language  
and environment that mainstream Java developers are, or will, look to  
as a natural next step.

One thing that would help Python in this "debate" (or, perhaps simply  
put it in the running, at least as a "next Java" candidate) would be  
if Python had an easier migration path for Java developers that  
currently rely upon various third-party libraries.  The wealth of  
third-party libraries available for Java has always been one of its  
great strengths.  Ergo, if Python had an easy-to-use, recommended way  
to use those libraries within the Python environment, that would be a  
significant advantage to present to Java developers and those who  
would choose Ruby over Java.  Platform compatibility is always a huge  
motivator for those looking to migrate or upgrade.

In that vein, I would point to JPype (http://jpype.sourceforge.net).   
JPype is a module that gives "python programs full access to java  
class libraries".  My suggestion would be to either:

(a) include JPype in the standard library, or barring that,
(b) make a very strong push to support JPype

(a) might be difficult or cumbersome technically, as JPype does need  
to build against Java headers, which may or may not be possible given  
the way that Python is distributed, etc.

However, (b) is very feasible.  I can't really say what "supporting  
JPype" means exactly -- maybe GvR and/or other heavyweights in the  
Python community make public statements regarding its existence and  
functionality, maybe JPype gets a strong mention or placement on  
python.org....all those details are obviously not up to me, and I  
don't know the workings of the "official" Python organizations enough  
to make serious suggestions.

Regardless of the form of support, I think raising people's awareness  
of JPype and what it adds to the Python environment would be a Good  
Thing (tm).

For our part, we've used JPype to make PDFTextStream (our previously  
Java-only PDF text extraction library) available and supported for  
Python.  You can read some about it here:

http://snowtide.com/PDFTextStream.Python

And I've blogged about how PDFTextStream.Python came about, and how  
we worked with Steve Ménard, the maintainer of JPype, to make it all  
happen (watch out for this URL wrapping):

http://blog.snowtide.com/2006/08/21/working-together-pythonjava-open- 
sourcecommercial

Cheers,

Chas Emerick
Founder, Snowtide Informatics Systems
Enterprise-class PDF content extraction

cemerick at snowtide.com
http://snowtide.com | +1 413.519.6365




More information about the Python-Dev mailing list