This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Jython/Python and the fly likes import .so files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Languages » Jython/Python
Bookmark "import .so files" Watch "import .so files" New topic

import .so files


Joined: Feb 06, 2004
Posts: 7
Is it possible to import .so files into jython ?
For our project we are using jython on a Linux Redhat configuration.
We want to import a module which imports a .so-file into jython.
Is this possible or is there an other way to call python from java.
We also tried to import the .so file in PYTHON and it worked, but Jython gave an error.

Joined: Feb 06, 2004
Posts: 7
We already solved the problem ourselves.
Instead of using jython, we just called python using the Runtime.exec() method.
Can anyone explain what exactly is the use of jython if it's just as simple as this to run python-code from java.
We thought the purpose of jython was to make python and java interact with eachother.
Peyton McCullough
Ranch Hand

Joined: Feb 07, 2004
Posts: 31
There are other uses for it besides embedding.
I agree. Here's the link:
subject: import .so files
jQuery in Action, 3rd edition