How does subprocess.call differ from os.system

后端 未结 1 499
伪装坚强ぢ
伪装坚强ぢ 2021-01-22 14:21

I have a python script to install/uninstall some regularly used programs for me and it also does some shortcut/folder clean up after uninstall. I used to use this code to delete

相关标签:
1条回答
  • 2021-01-22 14:33

    The difference is that os.system excutes in a subshell by default, whereas subprocess.call does not. Try using shell=True.

    0 讨论(0)
提交回复
热议问题