Skip to main content

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.

Example

key = Registry.open('HKEY_LOCAL_MACHINE', "SOFTWARE\\Python")
# 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:
    try:
        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()
            keyPath.close()
            keyVersion.close()
            break
    except RegistryError:
        break

corekey.close()
key.close()

Metadata

Release files for YARW 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for YARW 0.1.5
File Size Uploaded
YARW-0.1.5.tar.gz 32.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for YARW 0.1.5
File Interpreter ABI Platform
YARW-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 38.6 kB

Release files / YARW-0.1.5.tar.gz

Download URL YARW-0.1.5.tar.gz
Size 32.5 kB
Tags Source
SHA-256 checksum
How to use checksums
3c6d2e904f7aa42c07ad544d8beb4401527eaf826a95555618cc99fe9f050294
BLAKE2b-256 checksum
How to use checksums
1ec6e9212a9ff8a938674c5465df7a97230bc2d4cf17f4ce1a662a523ca9b56d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / YARW-0.1.5-py3-none-any.whl

Download URL YARW-0.1.5-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dd898684198c09fa273a43e11c6fdae5a5560495fb236121e95336ab25bf0aee
BLAKE2b-256 checksum
How to use checksums
e669503a4d600d89ad9730aa1750b8d405f30dccf8293df1f757e5f1e8c273f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

1 release file

0.1.3

2 release files

0.1.2

3 release files

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page