經安全檢測,此網站為安全網站,請放心前往原始網址!

shell - in python, get the output of system command as a string ...

Use os.popen() : tmp = os.popen("ls").read(). The newer way (> python 2.6) to do this is to use subprocess :

stackoverflow.com

網址安全性掃描由 google 提供