Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

winreg
queryvalue

What is winreg.QueryValue 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.

Answers Code

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.

QueryValue

winreg.QueryValue(key, sub_key) is a method of winreg. We use this to access an unnamed value for a key. This means that the data component of a value associated with the key whose name component is NULL is returned as a string.

Syntax

winreg.QueryValue(key, sub_key)

Parameters

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

sub_key: The string which is loaded under the key as the subkey. This is an optional parameter. Given that this parameter is None, the value is fetched is from SetValue() method.

RELATED TAGS

winreg
queryvalue

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.

Answers Code
Keep Exploring