python 判断一个进程是否存在
时间:2021-06-21 02:19:24
源代码如下:
#-*- coding:utf-8 -*-
def check_exsit(process_name):
import win32com.client
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('chrome.exe')
标签:python,进程判断
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
plsql与tsql的语法不同
2009-09-13 17:33:00
Python实现二维曲线拟合的方法
2021-08-26 12:38:01
有感用户体验规划与系统实现
2009-11-27 18:33:00
![](https://img.aspxhome.com/file/UploadPic/200911/27/01-48s.jpg)
Python字符串的全排列算法实例详解
2023-04-30 17:01:05
防采集,几种觉得有用的防采集方法
2009-09-03 13:30:00
通过代码实例了解Python异常本质
2023-06-14 06:29:19
![](https://img.aspxhome.com/file/2023/3/59473_0s.png)
43个应当避免的Web设计错误
2007-09-30 12:57:00
Windows系统下PhantomJS的安装和基本用法
2022-03-30 11:49:52
![](https://img.aspxhome.com/file/2023/5/72975_0s.png)
asp利用Split函数进行多关键字检索
2011-03-16 11:10:00
PHP实现批量生成App各种尺寸Logo
2023-07-23 03:59:59
详解python基础之while循环及if判断
2023-01-14 20:54:39
Python开发毕设案例之桌面学生信息管理程序
2021-03-02 14:56:08
![](https://img.aspxhome.com/file/2023/2/76752_0s.png)
ASP防止图片木马上传的代码
2011-02-05 11:08:00
CSS分栏布局的方法:绝对定位和浮动
2009-04-30 13:10:00
![](https://img.aspxhome.com/file/UploadPic/20094/30/241003206401-26s.gif)
正计时JS代码
2008-05-25 14:53:00
初学js者对javascript面向对象的认识分析
2011-03-16 11:04:00
使用python 打开文件并做匹配处理的实例
2022-01-15 16:27:30
php使用递归与迭代实现快速排序示例
2023-11-14 09:46:31
python通过opencv调用摄像头操作实例分析
2023-03-09 14:32:04
解决DataFrame排序sort的问题
2023-07-04 15:37:35