Re: get process id...

2006-09-21 Thread billie
Fredrik Lundh ha scritto: > billie wrote: > > >> under linux, do: > > > >> import os > >> os.getpid() > > > > Under Windows: > > > > import ctypes > > ctypes.windll.kernel32.GetCurrentProcessId() > > getpid() works just fine on Windows too: > > >>> import ctypes > >>> ctypes.windll.kernel

Re: get process id...

2006-09-21 Thread Chris
SpreadTooThin wrote: > How does one get the process id? > Is there a method for windows and unix (mac os x etc...) > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/442477 hth -- http://mail.python.org/mailman/listinfo/python-list

Re: get process id...

2006-09-21 Thread Fredrik Lundh
billie wrote: >> under linux, do: > >> import os >> os.getpid() > > Under Windows: > > import ctypes > ctypes.windll.kernel32.GetCurrentProcessId() getpid() works just fine on Windows too: >>> import ctypes >>> ctypes.windll.kernel32.GetCurrentProcessId() 1916 >>> import os >>> os.get

Re: get process id...

2006-09-21 Thread Tim Golden
billie wrote: > [EMAIL PROTECTED] 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.GetCu

Re: get process id...

2006-09-21 Thread billie
[EMAIL PROTECTED] 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() -- http://mail.pyt

Re: get process id...

2006-09-20 Thread georgeryoung
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() -- http://mail.python.org/mailman/listinfo/python-list