I have a Groovy script that gives me an output file that I will use as an input file to a Python script. I want to run the Groovy script from within python instead of running Groovy and then running Python. If it is possible, please tell me how I can do it?
There are mainly 2 ways:
os
library (https://docs.python.org/2/library/os.html#os.system):import os
os.system("groovy your_script.groovy")
subprocess
library (https://docs.python.org/2/library/subprocess.html)import subprocess
subprocess.check_call(["groovy", "your_script.groovy"])