So here is my problem : I wrote a script to connect to JMX service that needs to be run with Jython and that works perfectly ! I have also another script written in Python that is the « main » script of a bigger application that connects to different services by calling other Python scripts for each service.
The thing is I want this script to call and use the Jython one but without using an ugly method such as os.system("java -jar jython standalone jmx_with_jython.py..."), I found nothing online to call a Jython script from a python3 script…
If I start the main Python script with Jython I get a ton of lbraries errors because it uses Python2 following what I found on Internet (for example, one of them is : File "/my/dependencies/arguments.py", line 4, in <module> from urllib.parse import urlparse ImportError: No module named parse
).
And on the other hand, if I start the main Python3 script with Python3 it can’t start the Jython one because it doesn’t recognize the javax module that is used to connect to JMX (ModuleNotFoundError: No module named 'javax'
+ I tried to install the module javax with pip for python3 and it didn't work).
the biggest probleme is that I can't change the "main" script and I don't want to modify the Jython one too. Any ideas to use my Jython script from my Python3 script?