python判断命令执行成功

if os.system('lss')  !=0:
    print 'Without the command'
原文地址:https://www.cnblogs.com/effortsing/p/10459749.html