import commands print commands.getstatusoutput('ls')
输出:
(0, '1.py work.nfs')
参考文档:
https://blog.csdn.net/anshejd70787/article/details/101491324
--END-- 10:21