稳定盈利的期货交易方法-量化趋势交易

alantop -专业量化投资者

爱好:量化投资,逆向工程,渗透
随笔 - 595, 文章 - 0, 评论 - 921, 引用 - 0
数据加载中……

python3 检测进程是否存在

pip install pywin32

import win32com.client  
  
def check_exsit(process_name):  
    WMI = win32com.client.GetObject('winmgmts:')  
    processCodeCov = WMI.ExecQuery('select * from Win32_Process where Name="%s"' % process_name)  
    if len(processCodeCov) > 0:  
        print ('%s is exists' % process_name)  
    else:  
        print ('%s is not exists' % process_name)  
  
if __name__ == '__main__':  
    check_exsit('360se.exe')  

posted on 2018-05-19 12:06 AlanTop 阅读(445) 评论(0)  编辑 收藏 引用 所属分类: Python


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理