Communities for your favorite technologies. Explore all Collectives
Ask questions, find answers and collaborate at work with Stack Overflow for Teams.
Ask questions, find answers and collaborate at work with Stack Overflow for Teams. Explore Teams
Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
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?
shell=True
os.system
subprocess.Popen
commands.some_api_that_should_not_be_used
Try to use subprocess library. I hope it helps you: Subprocess management
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)
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.
shell=True
in docs)os.system
?subprocess.Popen
?commands.some_api_that_should_not_be_used
?