Python calling Java
Duncan Grisby
dgrisby at uk.research.att.com
Tue Feb 19 05:52:02 EST 2002
In article <a4rjq4$4n8$1 at web1.cup.hp.com>, jimh <jim at jim.jim> wrote:
>We have a bunch of Python (cgi) scripts producing html behind an Apache web
>server. We also have a set of Java libraries that I want to access from
>these Python scripts, but I haven't been able to figure out how to do this.
>I have downloaded and tried out Jython, but it takes 5-6 seconds just to run
>a one-line 'print "hi"' script, and this is, of course, not acceptable for a
>web server.
Depending on exactly what you need to do, it might be possible to run
the Java code in a separate process, and talk to it from your Python
scripts using CORBA or XML-RPC. Since the Java process would be
running all the time, the start-up overhead would not be an issue.
Cheers,
Duncan.
--
-- Duncan Grisby \ Research Engineer --
-- AT&T Laboratories Cambridge --
-- http://www.uk.research.att.com/~dpg1 --
More information about the Python-list
mailing list