How do I change a process name or even a thread name in python!
Erno Kuusela
erno-news at erno.iki.fi
Mon Feb 12 22:49:10 EST 2001
In article <969vkj$sak$1 at nntp6.u.washington.edu>, Donn Cave
<donn at u.washington.edu> writes:
| Quoth Kenneth Loafman <ken at lt.com>:
|| Try putting a '#! /usr/bin/python' as the first line, then running it as
|| '$ ./foo.py'. Under Linux/UNIX, that picks up the right name and
|| arguments for ps aux.
| It does? I don't think so!
| $ ./iam &
| [1] 28372
| $ ps wwaux | fgrep iam
| donn 28372 0.8 0.4 2768 1140 pts/1 S 16:31 0:00 /usr/local/bin/python ./iam
clearly, python needs setproctitle() in the posix module.
-- erno
More information about the Python-list
mailing list