473,326 Members | 2,124 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Python + Java Integration

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/...thonjava-open-
sourcecommercial

Cheers,

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

ce******@snowtide.com
http://snowtide.com | +1 413.519.6365
Aug 23 '06 #1
6 2985
Chas Emerick wrote:
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.
Is it? I thought it was more along the lines of "you've been struggling
with Java to build web-apps all this time - here, have Ruby on Rails
which is much easier". Python provides just as much simplicity in the
web frameworks, but no consensus on what is 'best' (recent BDFL
pronouncement aside), and thus only a small community for each
framework. I bet that if Django or TurboGears had been fully ready for
prime-time before Ruby on Rails, we wouldn't be having this discussion.

As a language, Python is much closer to Java than Ruby is anyway.
People already migrate over to Python from Java in their multitudes,
bringing some odd assumptions with them. (eg. The whole thing about
'why isn't a Python static method equivalent to a Java class method?'
because they've been wrongly told that 'static' in Java signifies a
'class method', and because they never read the Python docs where it
clearly shows that classmethod != staticmethod. A bit of C++ knowledge
might have sorted them out here too, as it would have for many problems
encountered by people who were raised on Java, but I digress...)
One thing that would help Python in this "debate" (or, perhaps simply
put it in the running, at least as a "next Java" candidate)
Java itself never deserved to be the 'next' anything anyway. It was
sold on hype and has never lived up to it. I can see your point from a
business perspective but I like to think Python is sold on its merits
and not on being the new panacea for middle managers to deploy.

--
Ben Sizer

Aug 23 '06 #2
Chas Emerick wrote:
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.
While you might have a point with easing the transition for java developers
might favor them python over ruby, you seem to mix a few things here, and
forget about others:
- ruby has no notion of java-library support. So if anything lures java
developers from J2EE-land to rails, its the framework itself. Which, by my
standards, is at least met if not excelled by TurboGears and Django. So
it's marketing, but of a different kind, we need.
- jython, after a period of seemingly inactivity, makes huge progress
towards python2.2 and python2.3. Which will open up new possibilities just
the other way round: use existing, powerful python libraries written in
post-2.1 from jython, neatly integrating java and python. Now there is
jRuby trying to do the same for ruby - but I never heard of it before
(googled it for this post), so it seems not to be as important as jython
certainly is
Diez
Aug 23 '06 #3

Java itself never deserved to be the 'next' anything anyway. It was
sold on hype and has never lived up to it. I can see your point from a
business perspective but I like to think Python is sold on its merits
and not on being the new panacea for middle managers to deploy.
Bravo. I could not have said it any better.

Aug 23 '06 #4
Ben Sizer wrote:
Java itself never deserved to be the 'next' anything anyway.
I've had a lot of developers come up to me and
say, "I haven't had this much fun in a long time.
It sure beats writing Cobol" -- James Gosling

</F>

Aug 23 '06 #5
Fredrik Lundh wrote:
Ben Sizer wrote:
Java itself never deserved to be the 'next' anything anyway.

I've had a lot of developers come up to me and
say, "I haven't had this much fun in a long time.
It sure beats writing Cobol" -- James Gosling
Nice quote! It also reinforces the impression that there are many
people working with technology who don't have very much control over
the tools they get to use - you could replace Cobol with VB in the
quote and it'd still echo the sentiments of a large number of
developers.

Of course, it's just not accurate to imply that Java had nothing to
offer: in an age when a number of languages provided support for safe
execution (Obliq, Telescript, Safe-Tcl, etc.) and where a few had
in-built support for concurrency (Ada, Occam, etc.), Java rather
effectively brought both of these and more to the mainstream. It may be
true that the language didn't justify the hype and that the API was
fairly badly designed in various places, but it represented a step up
for most developers, and the hype managed to give many of those
developers a chance or an excuse to use the language, rather than be
forbidden to use it because it didn't fit in with corporate or
organisational strategy.

There are parallels with Rails in the Java hype story: something better
than what lots of people are using (probably PHP in most cases),
combined with a dose of hype to persuade decision makers that everyone
else in the herd is moving in that direction, leads to something
suddenly becoming popular, being perceived as the next big thing, and
having lots of vocal evangelists who might seem like wise men to the
masses, but whose pronouncements on dynamic languages, for example,
seem belated and obvious to many of us. For those inclined to panic at
such a spectacle, a perusal of the comp.lang.python/python-list
archives for 1996-1998 might be informative to see how a community can
adapt sensibly to such events.

Paul

Aug 24 '06 #6
Fredrik Lundh wrote:
Ben Sizer wrote:

>>Java itself never deserved to be the 'next' anything anyway.


I've had a lot of developers come up to me and
say, "I haven't had this much fun in a long time.
It sure beats writing Cobol" -- James Gosling

</F>
"Java is Object-Oriented COBOL":

http://www.artima.com/weblogs/viewpost.jsp?thread=42242

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden

Aug 28 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

28
by: Erik Johnson | last post by:
This is somewhat a NEWBIE question... My company maintains a small RDBS driven website. We currently generate HTML using PHP. I've hacked a bit in Python, and generally think it is a rather...
1
by: bezeee | last post by:
At my work we are in the process of building a tool to test an XML based API. Basically, XML in and XML out over http. Currently, there are two engines that do all of the schema validations, xml...
3
by: gohaku | last post by:
Hi everyone, I would like to know if it's possible to use python (libraries) in a Java Program. I do not want to use: Process proc = Runtime.getRuntime.exec(command) I am basically looking for...
36
by: Andrea Griffini | last post by:
I did it. I proposed python as the main language for our next CAD/CAM software because I think that it has all the potential needed for it. I'm not sure yet if the decision will get through, but...
25
by: abhinav | last post by:
Hello guys, I am a novice in python.I have to implement a full fledged mail server ..But i am not able to choose the language.Should i go for C(socket API) or python for this project? What are the...
8
by: Dave Potts | last post by:
Hi, I'm just starting a development project in Python having spent time in the Java world. I was wondering what tool advice you could give me about setting up a continuous integration...
2
by: Jobs | last post by:
Download the JAVA , .NET and SQL Server interview with answers Download the JAVA , .NET and SQL Server interview sheet and rate yourself. This will help you judge yourself are you really worth of...
5
by: Hussein B | last post by:
Hi. Please correct my if I'm wrong but it seems to me that the major continuous integration servers (Hudson, CruiseControl, TeamCity ..) don't support Python based application. It seems they...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.