Question

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?

Était-ce utile?

La solution

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

Autres conseils

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)
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top