get process id...

billie gnewsg at gmail.com
Thu Sep 21 03:49:58 EDT 2006


georgeryoung at gmail.com ha scritto:

> SpreadTooThin wrote:
> > How does one get the process id?
> > Is there a method for windows and unix (mac os x etc...)
>
> under linux, do:
>   import os
>   os.getpid()

Under Windows:
import ctypes
ctypes.windll.kernel32.GetCurrentProcessId()




More information about the Python-list mailing list