Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Yet Another Registry Wrapper

Project description

YARW: Yet Another Registry Wrapper

This recipe provides “Registry”, a Windows registry wrapper class that makes it easy to work with the Windows registry. The class works with an inner class named “RegistryKey”, which wraps up a Windows registry key and provides methods to access and manipulate the key information. The class provides easy to remember substitutes for long method names of _winreg.


# Prints the RegistryKey instance
print key
# Prints the key name and the wrapped up PyHKEY instance
print key.getkeyname(), key.getkey()
corekey = key.openkey(1)

idx = 0
# Print the install path for Python 2.4 if installed.
while True:
        keyname = corekey.enumkey(idx)
        idx += 1
        if keyname == '2.4':
            keyVersion = corekey.openkey(idx)
            print keyVersion, keyVersion.getkeyname()
            keyPath = keyVersion.openkey(2)
            print keyPath, keyPath.getkeyname()
            print 'Install path is %s' % keyPath.getvalue()
    except RegistryError:


Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for YARW, version 0.1.5
Filename, size File type Python version Upload date Hashes
Filename, size YARW-0.1.5-py3-none-any.whl (6.1 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size YARW-0.1.5.tar.gz (32.5 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page