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?

War es hilfreich?

Lösung

Try to use subprocess library. I hope it helps you: Subprocess management

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
scroll top