{ "info": { "author": "chrono-meter@gmx.net", "author_email": "chrono-meter@gmx.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Win32 (MS Windows)", "Intended Audience :: Developers", "License :: OSI Approved :: Python Software Foundation License", "Operating System :: Microsoft :: Windows", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "regpath - pathlib and winreg\r\n============================\r\n\r\nDependencies\r\n------------\r\n\r\n* Python 3.4, 3.5\r\n* `pathlib `_ (Standard library in Python 3.4)\r\n\r\n\r\nInstall\r\n-------\r\n\r\n``pip install regpath``\r\n\r\n\r\nExamples\r\n--------\r\n\r\nImport::\r\n\r\n >>> from regpath import RegistryPath\r\n\r\nCreate object::\r\n\r\n >>> p = RegistryPath('HKCU')\r\n\r\nAccess PurePath compaitble propertyes::\r\n\r\n >>> p\r\n RegistryPath('HKCU')\r\n >>> print(p)\r\n HKCU\r\n >>> p.drive, p.root, p.parts\r\n ('HKCU', '', ('HKCU',))\r\n\r\nList keys::\r\n\r\n >>> list(p.iterdir())\r\n [RegistryPath('HKCU/AppEvents'), RegistryPath('HKCU/AppXBackupContentType'), RegistryPath('HKCU/Console'),\r\n RegistryPath('HKCU/Control Panel'), RegistryPath('HKCU/Environment'), RegistryPath('HKCU/EUDC'),\r\n RegistryPath('HKCU/Keyboard Layout'), RegistryPath('HKCU/Network'), RegistryPath('HKCU/Printers'),\r\n RegistryPath('HKCU/Software'), RegistryPath('HKCU/System'), RegistryPath('HKCU/Volatile Environment')]\r\n\r\nJoin path::\r\n\r\n >>> p = p / 'Environment'\r\n >>> p\r\n RegistryPath('HKCU/Environment')\r\n >>> print(p)\r\n HKCU\\Environment\r\n >>> p.drive, p.root, p.parts\r\n ('HKCU', '\\\\', ('HKCU', 'Environment'))\r\n\r\nList values::\r\n\r\n >>> list(p)\r\n ['TEMP', 'TMP']\r\n >>> p['Temp']\r\n '%USERPROFILE%\\\\AppData\\\\Local\\\\Temp'\r\n\r\nThen::\r\n\r\n >>> p = RegistryPath(r'HKCU\\Software\\{d017c5cb-d6a6-453e-b41a-f3dc270628c0}\\subkey')\r\n\r\n >>> p.exists()\r\n False\r\n >>> p.mkdir(parents=True)\r\n >>> p.exists()\r\n True\r\n\r\n >>> list(p)\r\n []\r\n >>> p[''] = 'This is unnamed value.'\r\n >>> list(p)\r\n ['']\r\n >>> p['']\r\n 'This is unnamed value.'\r\n >>> p['number'] = 0x12345678\r\n >>> p['number']\r\n 305419896\r\n >>> list(p)\r\n ['', 'number']\r\n >>> del p['number']\r\n >>> list(p)\r\n ['']\r\n >>> del p['']\r\n >>> list(p)\r\n []\r\n\r\n >>> p['msg'] = 'hello, world'\r\n >>> p.parent.rmdir()\r\n Traceback (most recent call last):\r\n ...\r\n PermissionError: [WinError 5] Access is denied.\r\n\r\n >>> p.parent.rmtree()\r\n >>> p.parent.exists()\r\n False\r\n >>> p.exists()\r\n False\r\n >>> list(p)\r\n Traceback (most recent call last):\r\n ...\r\n OSError: [WinError 1018] Illegal operation attempted on a Registry key which has been marked for deletion.", "description_content_type": null, "docs_url": null, "download_url": "http://pypi.python.org/pypi/regpath", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/chrono-meter/regpath", "keywords": "", "license": "PSF", "maintainer": "", "maintainer_email": "", "name": "regpath", "package_url": "https://pypi.org/project/regpath/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/regpath/", "project_urls": { "Download": "http://pypi.python.org/pypi/regpath", "Homepage": "https://github.com/chrono-meter/regpath" }, "release_url": "https://pypi.org/project/regpath/0.1.0/", "requires_dist": null, "requires_python": null, "summary": "regpath - pathlib and winreg", "version": "0.1.0" }, "last_serial": 1875702, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "d93664c5caec0e11f8ad3502248fe66e", "sha256": "393e245217087d2fd68b8185b1d79307efe9f00332fd68dd8ba1b66defd0281a" }, "downloads": -1, "filename": "regpath-0.1.0.zip", "has_sig": false, "md5_digest": "d93664c5caec0e11f8ad3502248fe66e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9549, "upload_time": "2015-12-22T09:34:40", "url": "https://files.pythonhosted.org/packages/8b/b6/1038019f73806236e34c869bf3f0ad744a4774f3cd54e9a24031a017daa8/regpath-0.1.0.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d93664c5caec0e11f8ad3502248fe66e", "sha256": "393e245217087d2fd68b8185b1d79307efe9f00332fd68dd8ba1b66defd0281a" }, "downloads": -1, "filename": "regpath-0.1.0.zip", "has_sig": false, "md5_digest": "d93664c5caec0e11f8ad3502248fe66e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9549, "upload_time": "2015-12-22T09:34:40", "url": "https://files.pythonhosted.org/packages/8b/b6/1038019f73806236e34c869bf3f0ad744a4774f3cd54e9a24031a017daa8/regpath-0.1.0.zip" } ] }