首页 技术 正文
技术 2022年11月10日
0 收藏 857 点赞 2,346 浏览 807 个字
#!/usr/bin/env python
#-*- coding:utf-8 -*-''' 打印系统所有的PID '''import osdef get_all_pid():
for pid in os.listdir("/proc"):
try:
print(int(pid)),
except:
passget_all_pid()
[root@localhost ~]$ python get_all_pid.py
1 2 3 5 7 8 9 10 11 13 14 15 16 17 18 19 20 21 27 28 29 30 38 40 41 42 43 56 108 219 221 223 225 227 228 237 252 253 327 352 357 462 464 469 470 473 710 777 854 858 877 878 1217 1272 1357 1358 1359 1362 1365 1370 1371 1390 1391 1392 1393 1394 1395 1396 1397 1403 2472 2642 2924 3286 3287 3305 3624 3625 4015 4735 5098 5099 5588 5591 7577 7608 7694 8009 8066 8097 8120 8147 8185 8244 8348 8403 8484 8505 8564 8630 8694 8701 8709 8717 8739 8752 8759 8785 8814 8841 8862 8904 8905 9019 9040 9237 10406 10426 10447 10449 10451 10459 10479 10480 10481 10486 10490 10495 10499 10500 10501 10502 10503 10505 10512 10592 10657 10658 10659 10660 15200 15297 15952 16040 18244 18917 19964 20030 20122 22383 22384 22385 22390 23834 23853 24492 25819 26003 26187 26822 27304 30113 32499 32596
相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:8,987
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,503
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,347
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,130
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,765
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,842