python - subprocess.call requiring all parameters to be separated by commas -


i used able subprocess.call(["command","-option value -option value"]) , work there change command work things in quotes, have change subprocess call command this:

subprocess.call(["command","-option","value","-option","value"]) 

is there can work other way again in python?

the os.system("command -option value -option value") works same did before.

you'll need specify shell=true subprocess.call interpret string.

see note in subprocess.popen constructor documentation (the subprocess.call method takes same arguments subprocess.popen constructor).


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -