![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
文章平均质量分 66
北冥有鱼兮
技术控
展开
-
监测同名进程,防止重复调用
对于crontab * * * * *的,十分有必要。防止重复调用。 这里的进程名是指脚本的完整路径,需能ps到。 加在每个程序的开头。 方法一:不影响原先的程序,本次退出执行。 importsys,commandsif int(commands.getoutput("ps -ef |grep '"+sys.argv[0]+"' |grep -v原创 2017-04-19 16:47:57 · 1124 阅读 · 0 评论 -
python程序的加密和打包
用CYTHON编译加密:build.py#!/usr/bin/python#encoding: gb2312 filename="client_missions.py" print"--------------------------------------"print" python build.py build_ext --inplace"原创 2017-04-19 16:52:53 · 4296 阅读 · 0 评论