[Tutor] application name of a process
Thu, 2 Nov 2000 20:06:03 -0500
If you're talking about the name of the running process, sys.argv would do it.
If you're talking about other processes, I don't know. Check the source for 'ps' ;-). You can probably get it out of /proc if you're on a Linux (I don't know about other unices) system.
On Thu, 02 Nov 2000 11:00:00 Gianmarco Baronio wrote:
| Hello everybody,
| I'm working with Pythonwin.
| I know the PID associated with my process in this way:
| >>> import os
| >>> PID = os.getpid()
| How can I have the name of the application associated with a process if
| I know the PID?
| tel;fax:+39 030 2209205
| tel;work:+39 030 24411
| org:<CENTER><B><I><FONT FACE="Arial,Helvetica" COLOR="#000000" SIZE="+2">Siosistemi</FONT></I></B><HR WIDTH="30%" NOSHADE SIZE=1><FONT FACE="Times" SIZE="-3">CONNECTING BUSINESS</FONT></CENTER>
| adr;quoted-printable:;;via Cefalonia 58=0D=0A25124 Brescia;Brescia;BS;25124;Italy
| fn:Gianmarco Baronio