python2.7使用setproctitle库自定义python程序的进程名称

setproctitle is a library to allow customization of the process title.

安装:

sudo easy_install setproctitle

使用:

from setproctitle import setproctitle,getproctitle 
procname = 'pname' 
setproctitle(procname ) 
print getproctitle () 
i = raw_input ('input-->')

在运行时候查看系统进程,能看到pname进程。

相关资料:

http://code.google.com/p/py-setproctitle/
 

你可能感兴趣的:(python,setproctitle)