while not WindowsError: listOfValues.append(repr(_winreg.EnumValue(handleObject,i))) i += 1