PyHANDLE Object

A Python object, representing a win32 HANDLE.

Comments

This object wraps a win32 HANDLE object, automatically closing it when the object is destroyed. To guarantee cleanup, you can call either PyHANDLE::Close, or win32api::CloseHandle.
Most functions which accept a handle object also accept an integer - however, use of the handle object is encouraged.

Properties

long handle
Integer value of the handle

Methods

Close
Closes the handle 

close
Synonym for PyHANDLE::Close 

Detach
Detaches the Win32 handle from the handle object. 

__nonzero__
Used for detecting true/false. is nb_bool in Python 3.0 

__int__
Used when an integer representation of the handle object is required. 

__hash__
Used when the hash value of an object is required tp_hash 

__str__
Used when a string representation is required tp_str