python判断命令执行成功

if os.system('lss')  !=0:
    print 'Without the command'

 

posted @ 2019-03-02 09:36  effortsing  阅读(5367)  评论(0)    收藏  举报