#NEWLINE# def __init__( self , hKey , path = None , machine = None ) : #NEWLINE# #INDENT# self . access = Con . KEY_ALL_ACCESS #NEWLINE# if isinstance ( hKey , pywintypes . HANDLEType ) : #NEWLINE# #INDENT# if ( path is None ) : #NEWLINE# #INDENT# self . hKey = hKey #NEWLINE# self . path = None #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . hKey = Api . RegOpenKeyEx ( hKey , path , 0 , self . access ) #NEWLINE# self . path = path #NEWLINE# #UNINDENT# self . machine = None #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( machine is None ) : #NEWLINE# #INDENT# self . hKey = Api . RegOpenKeyEx ( hKey , path , 0 , self . access ) #NEWLINE# self . path = path #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( not machine . startswith ( '\\\\' ) ) : #NEWLINE# #INDENT# machine = ( '\\\\%s' % machine ) #NEWLINE# #UNINDENT# hKey = Api . RegConnectRegistry ( machine , hKey ) #NEWLINE# if ( path is None ) : #NEWLINE# #INDENT# self . hKey = hKey #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . hKey = Api . RegOpenKeyEx ( hKey , path , 0 , self . access ) #NEWLINE# #UNINDENT# self . path = path #NEWLINE# #UNINDENT# self . machine = machine