Try to use subprocess library. I hope it helps you: Subprocess management
Syntax error while executing java command in python script
-
31-05-2022 - |
Frage
i want to execute following command in a python script
java -cp lib/*:esalib.jar clldsystem.esa.ESAAnalyzer "$1" "$2"
but i'm getting a syntax error due to the '*' and ':' in the path of jar files. How else could i do it?
Lösung
Andere Tipps
i used the subprocess library and its working now.:) Here is how i did it
import shlex,subprocess
x='java -cp "lib/*:esalib.jar" clldsystem.esa.ESAAnalyzer "$1" "$2"'
args=shlex.split(x)
p=subprocess.Popen(args)
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow