win32api.GetCurrentProcess
int = GetCurrentProcess()
Returns a pseudohandle for the current process.
Comments
A pseudohandle is a special constant that is interpreted as the current thread handle. The calling thread can use this handle to specify itself whenever a thread handle is required. Pseudohandles are not inherited by child processes. The method win32api::DuplicateHandle can be used to create a handle that other threads and processes can use. As this handle can not be closed, and integer is returned rather than a PyHANDLE object, which would attempt to automatically close the handle.
Win32 API References