Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

winreg
queryvalueex

What is winreg.QueryValueEx in Python?

Sarvech Qadir

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

winreg (Windows Registry API) provides functions to expose the Windows Registry API to Python. We use this module to expose a low-level interface to the registry.

QueryValueEx

We use the method QueryValueEx to access information such as the type and data components for a specified value name. It is required that the value name associated with a key must be of an open key.

Syntax

winreg.QueryValueEx(key, value_name)

Parameters and return value

key: The handle which is returned by ConnectRegistry(), including the constants in HKEY_USERS or HKEY_LOCAL_MACHINE.

value_name: This refers to the value that we want to query in our keys.

Return value

This method returns a tuple containing the relevant items. At index 0, the tuple contains the value of the specific registry item. At index 1, the tuple contains the type of the specific registry item in the form of an integer value.

RELATED TAGS

winreg
queryvalueex

CONTRIBUTOR

Sarvech Qadir
Copyright ©2022 Educative, Inc. All rights reserved

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Keep Exploring