How can I run a Jython script with Python
<p>I am programming in Python(2.7), processing a bunch of data.
And I've got a software, what I have to use, and I want to start it automatically, and fill it up with data.</p>

<p>The problem is, that I cant open it with Python, because it has API only for Jython. </p>

<p>My question is, that how could I run a Jython script from a Python code(actually I am working on a standalone software)?
Is it even possible?</p>

<p>If it is, could you please give me a short example?
How to install Jython and how to run a file from python?</p>

<p>You can simply use Jython to run everything.</p>

<p>Having <code>my_script.py</code> and <code>jython_script.py</code> edit <code>my_script.py</code> by adding <code>import jython_script</code> and adding call <code>jython_script.some_function()</code>.</p>

<pre><code># my_script.py
import jython_script

def my_function_using_some_function_from_jython_script():
    ...
    jython_script.some_function()
    ...
</code></pre>

<p>Then simply call:</p>

<pre><code>jython my_script.py
</code></pre>

<p>I assume you do not use modules that work only with CPython.</p>

python python-2.7 jython