2012年12月27日

Python模块学习 ---- subprocess 创建子进程

摘要: 最近,我们老大要我写一个守护者程序,对服务器进程进行守护。如果服务器不幸挂掉了,守护者能即时的重启应用程序。上网Google了一下,发现Python有很几个模块都可以创建进程。最终我选择使用subprocess模块,因为在Python手册中有这样一段话: This module intends to replace several other, older modules and functions, such as: os.system、os.spawn*、os.popen*、popen2.*、commands.* subprocess被用来替换一些老的模块和函数,如:os.system.. 阅读全文

posted @ 2012-12-27 09:57 百年孤寂dwn 阅读(780) 评论(0) 推荐(0) 编辑

导航