Bash command output as string python variable

前端 未结 0 1856
南方客
南方客 2021-01-05 07:45

I am running a bash command via this python script:

import os
a = os.system("pacman -Qu")

I need to save the output that "pacm

相关标签:
回答
  • 消灭零回复
提交回复
热议问题