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.getpid()
1916

</F>

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to