>>> a = os.popen("pgrep top").read().strip()

>>> a
'3276'
>>> os.system("kill -9 %s" % a)
0

相关文章:

  • 2022-12-23
  • 2021-08-01
  • 2021-09-05
  • 2022-01-21
  • 2021-12-29
  • 2021-11-20
  • 2021-08-16
猜你喜欢
  • 2021-11-29
  • 2022-12-23
  • 2021-11-03
  • 2022-01-18
  • 2021-10-04
  • 2022-12-23
相关资源
相似解决方案