python判断命令执行成功

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

 

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