I would like to use a type 4 JDBC driver in my Python program. I
believe I can use in with Jython. Do you know of some way to
communicate between the Jython and Python processes so that the CPython
program can use the Jython JDBC database connection?
Randall 10 2120
Randall Smith wrote: I would like to use a type 4 JDBC driver in my Python program. I believe I can use in with Jython. Do you know of some way to communicate between the Jython and Python processes so that the CPython program can use the Jython JDBC database connection?
Randall
Write the application using Jython. Then use SimpleXMLRPCServer on the
Jython side to register the necessary functions for an XML-RPC client
written in Python.
HTH
T
Randall Smith wrote: I would like to use a type 4 JDBC driver in my Python program. I believe I can use in with Jython. Do you know of some way to communicate between the Jython and Python processes so that the CPython program can use the Jython JDBC database connection?
Create some form of IPC between the two, for instance using xmlrpc.
--Irmen
PS: I would have suggested to use Pyro, but:
- Java/Jython doesn't have the select() system call that Pyro needs for a server,
- There are bugs in Jython that make it crash when compiling Pyro's source.
Irmen de Jong wrote: Randall Smith wrote:
I would like to use a type 4 JDBC driver in my Python program. I believe I can use in with Jython. Do you know of some way to communicate between the Jython and Python processes so that the CPython program can use the Jython JDBC database connection?
Create some form of IPC between the two, for instance using xmlrpc.
--Irmen
PS: I would have suggested to use Pyro, but: - Java/Jython doesn't have the select() system call that Pyro needs for a server, - There are bugs in Jython that make it crash when compiling Pyro's source.
<shameless plug>
Alternately, you can look at JPype ( http://jpype.sourceforge.net ).
It is still a very early release, but I would welcome any feeback. And
version 0.1 should allow you to use JDBC without problem.
It currently only works on Windows, but if there is interest, I could
make a linux release pretty quickly.
</shameless plug>
Steve Menard <st**********@videotron.ca> writes:
[...] Alternately, you can look at JPype ( http://jpype.sourceforge.net ).
It is still a very early release, but I would welcome any feeback. And version 0.1 should allow you to use JDBC without problem.
It currently only works on Windows, but if there is interest, I could make a linux release pretty quickly.
I assume you've seen JPE?
How does / will JPype differ from that?
I *think* JPE hasn't been maintained for quite a while, but I'm not
certain what its current state is.
John
John J. Lee wrote: Steve Menard <st**********@videotron.ca> writes: [...]
Alternately, you can look at JPype ( http://jpype.sourceforge.net ).
It is still a very early release, but I would welcome any feeback. And version 0.1 should allow you to use JDBC without problem.
It currently only works on Windows, but if there is interest, I could make a linux release pretty quickly.
I assume you've seen JPE?
How does / will JPype differ from that?
I *think* JPE hasn't been maintained for quite a while, but I'm not certain what its current state is.
John
Yes I have seen JPE. However, from the my admitedly quick look, it
didn't allow the seemless integration I am looking for. Either that, or
the samples did show off what JPE could do.
Besides I intend to take JPype beyonf Python->Java integration, and
choice is always good :)
Steve
Steve Menard <st**********@videotron.ca> writes:
[...] Besides I intend to take JPype beyonf Python->Java integration, and choice is always good :)
Especially when the closest alternative is unmaintained! I've
certainly wanted something like this in the past.
Good luck with your project.
John
Steve Menard <st**********@videotron.ca> wrote in message news:<zt*********************@wagner.videotron.net >... Irmen de Jong wrote: Randall Smith wrote:
I would like to use a type 4 JDBC driver in my Python program. I believe I can use in with Jython. Do you know of some way to communicate between the Jython and Python processes so that the CPython program can use the Jython JDBC database connection?
Create some form of IPC between the two, for instance using xmlrpc.
--Irmen
PS: I would have suggested to use Pyro, but: - Java/Jython doesn't have the select() system call that Pyro needs for a server, - There are bugs in Jython that make it crash when compiling Pyro's source.
<shameless plug> Alternately, you can look at JPype ( http://jpype.sourceforge.net ).
It is still a very early release, but I would welcome any feeback. And version 0.1 should allow you to use JDBC without problem.
It currently only works on Windows, but if there is interest, I could make a linux release pretty quickly.
</shameless plug>
That's awesome ! This is still a little bit rough on the edges, but it
already works well enough to have an idea of what it could bring to
Python.
This is what I mean by 'rough on the edge' : launching a Python
program using JPype from a .py file is OK, but using the prompt is
weird : from jpype import * startJVM(r"C:\j2sdk1.4.2_03\jre\bin\client\jvm.dll ", "-ea") 1+1
File "<stdin>", line 1
1+1
^
SyntaxError: invalid syntax help()
File "<stdin>", line 1
help()
^
SyntaxError: invalid syntax
Anyway, this is extremely promising. Soon, we'll be able to seamlessly
use Java object thanks to JPype, as we do with COM objects using
win32all or ctypes. Python is THE real integration/composition
platform !
Thanks for your work, Steve.
Regards,
Nicolas ni*****@lehuen.com (Nicolas Lehuen) wrote in message
<<snip>> <shameless plug> Alternately, you can look at JPype ( http://jpype.sourceforge.net ).
It is still a very early release, but I would welcome any feeback. And version 0.1 should allow you to use JDBC without problem.
It currently only works on Windows, but if there is interest, I could make a linux release pretty quickly.
</shameless plug>
That's awesome ! This is still a little bit rough on the edges, but it already works well enough to have an idea of what it could bring to Python.
This is what I mean by 'rough on the edge' : launching a Python program using JPype from a .py file is OK, but using the prompt is weird :
from jpype import * startJVM(r"C:\j2sdk1.4.2_03\jre\bin\client\jvm.dll ", "-ea") 1+1 File "<stdin>", line 1 1+1 ^ SyntaxError: invalid syntax help()
File "<stdin>", line 1 help() ^ SyntaxError: invalid syntax
Anyway, this is extremely promising. Soon, we'll be able to seamlessly use Java object thanks to JPype, as we do with COM objects using win32all or ctypes. Python is THE real integration/composition platform !
Thanks for your work, Steve.
Regards, Nicolas
Thanks for your enthusiasm, and for the feedback.
However, I have tried what you've described above, and had no problem.
further An invalid syntax is usually something thrown by the parser,
way before any JPype-related code sees the commands.
If the problem persists, can you enter a bug report at JPype's
souceforge project page? ( http://sourceforge.net/projects/jpype/ )
I would like to use SF's tracking features to keep everyone up to date
on what is going on. As a matter of fact you'll be able to track each
releases progress by looking at the task list.
Again, thanks for your interest.
Steve Ménard
How about Spiro? http://www.freenet.org.nz/python/spiro/
Randall Smith <ra*****@tnr.cc> wrote in message news:<8dssc.179150$f_5.163363@lakeread01>... I would like to use a type 4 JDBC driver in my Python program. I believe I can use in with Jython. Do you know of some way to communicate between the Jython and Python processes so that the CPython program can use the Jython JDBC database connection?
Randall This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Michael Chermside |
last post by:
Ype writes:
> For the namespaces in Jython this 'Python internal thread safety'
> is handled by the Java class:
>
> http://www.jython.org/docs/javadoc/org/python/core/PyStringMap.html
>
> which...
|
by: Dave Benjamin |
last post by:
Hey good people,
I've been doing a lot of simultaneous Jython and CPython programming lately,
and just wanted to say, with no intended ill will toward any of the
individuals who have been...
|
by: angel |
last post by:
A java runtime environment includes jvm and java class (for example
classes.zip in sun jre). Of course jython need jvm,but does it need java
class.
Thanx
|
by: Maurice LING |
last post by:
Hi,
I'm looking for a suitable thesis topic, so I hope that I can gather
some advice on this area that I'm thinking of.
Jython appears as a relatively successful attempt to bridge Python to...
|
by: Maurice Ling |
last post by:
Hi,
I have read that this had been asked before but there's no satisfactory
replies then.
I have a module (pA) written in python, which originally is called by
another python module (pB), and...
|
by: Jim Hargrave |
last post by:
I've read that it is possible to compile jython to native code using
GCJ. PyLucene uses this approach, they then use SWIG to create a Python
wrapper around the natively compiled (java) Lucene. Has...
|
by: Ramza Brown |
last post by:
This is an update from Brian Zimmer of the Jython group, new release:
"There is a new release of Jython available at Sourceforge:
http://sourceforge.net/project/showfiles.php?group_id=12867
...
|
by: Gerard Flanagan |
last post by:
Hello all
I have a 'logger' module which is essentially just a facade over the
'logging' standard module. Can this be called from jython, and how is
this acheived? This is a colleague's question...
|
by: Felipe De Bene |
last post by:
Hi There,
I'm trying to run an App I wrote in Python 2.5.2 in Jython 2.2.1 and
everything works fine except when I try to import the Standard
CPython's cookielib. I know this may sound stupid, I...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |