Home > Backend Development > Python Tutorial > Detailed explanation of Python custom process name

Detailed explanation of Python custom process name

高洛峰
Release: 2017-03-23 15:26:06
Original
3485 people have browsed it

Under normal circumstances, we directly start the python program and use ps to view it. The displayed The result is pyton xxx.py, and the web application uses netstat or ss to view it as python

It’s too impersonal, too general, and very ordinary. So there is a group of people who don’t. Satisfied with the fixed name, forging ahead (you are curious, maybe it is just pretending), and showing off your personality, so Google found a very ( ) third-party library—

set

proctitle .

Installation

Method:

Usage:

#coding:utf8import setproctitle
setproctitle.setproctitle("进程别名")
Copy after login

The effect is as follows:

The above is the detailed content of Detailed explanation of Python custom process name. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template