How to use subprocess when multiple arguments contain spaces?

后端 未结 10 2246

I\'m working on a wrapper script that will exercise a vmware executable, allowing for the automation of virtual machine startup/shutdown/register/deregister actions. I\'m t

10条回答
  •  一个人的身影
    2021-01-07 18:47

    Why are you using r""? I believe that if you remove the "r" from the beginning, it will be treated as a standard string which may contain spaces. Python should then properly quote the string when sending it to the shell.

提交回复
热议问题