def openkey(self, index):
            """ Open the sub-key at the given index and return
            the created RegistryKey object """

            # NOTE: The index is starting from 1,not zero!
            
            subkey = self.enumkey(index-1)
            if subkey:
                r = Registry.RegistryKey()
                r.setkey(wreg.OpenKey(self._hkey, subkey))
                r.setkeyname(subkey)
                return r
            else:
                raise RegistryError,'No sub-key found at index %d!' % index
 Open the sub-key at the given index and return
            the created RegistryKey object 
recipes/Python/476229_YARW__Yet_Another_Registry/recipe-476229.py