{ "info": { "author": "Jens Diemer", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License (GPL)", "Operating System :: OS Independent", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3 :: Only", "Topic :: Software Development", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "---------------\npathlib_revised\n---------------\n\nExpand the origin Python `pathlib `_ module:\n\n* work-a-round for Windows MAX_PATH limit, by adding ``\\\\?\\`` path prefix\n\n* add missing stuff, like: ``makedirs``, ``utime``, ``scandir`` etc.\n\nThere is also the class, called `DirEntryPath `_ that holds more cached information than `os.DirEntry `_\n\n* python 3.4 or newer only\n\n* Beta state\n\nPlease, try, fork and contribute! ;)\n\n+--------------------------------------+-----------------------------------------------------------+\n| |Build Status on travis-ci.org| | `travis-ci.org/jedie/pathlib_revised`_ |\n+--------------------------------------+-----------------------------------------------------------+\n| |Build Status on appveyor.com| | `ci.appveyor.com/project/jedie/pathlib_revised`_ |\n+--------------------------------------+-----------------------------------------------------------+\n| |Coverage Status on coveralls.io| | `coveralls.io/r/jedie/pathlib_revised`_ |\n+--------------------------------------+-----------------------------------------------------------+\n| |Requirements Status on requires.io| | `requires.io/github/jedie/pathlib_revised/requirements/`_ |\n+--------------------------------------+-----------------------------------------------------------+\n\n.. |Build Status on travis-ci.org| image:: https://travis-ci.org/jedie/pathlib_revised.svg\n.. _travis-ci.org/jedie/pathlib_revised: https://travis-ci.org/jedie/pathlib_revised/\n.. |Build Status on appveyor.com| image:: https://ci.appveyor.com/api/projects/status/py5sl38ql3xciafc?svg=true\n.. _ci.appveyor.com/project/jedie/pathlib_revised: https://ci.appveyor.com/project/jedie/pathlib_revised/history\n.. |Coverage Status on coveralls.io| image:: https://coveralls.io/repos/jedie/pathlib_revised/badge.svg\n.. _coveralls.io/r/jedie/pathlib_revised: https://coveralls.io/r/jedie/pathlib_revised\n.. |Requirements Status on requires.io| image:: https://requires.io/github/jedie/pathlib_revised/requirements.svg?branch=master\n.. _requires.io/github/jedie/pathlib_revised/requirements/: https://requires.io/github/jedie/pathlib_revised/requirements/\n\nWindows MAX_PATH\n================\n\nThere is a limit in the Windows API: Path can't be longer than 259 characters (called: \"MAX_PATH\").\nThe work-a-round is to add the prefix ``\\\\?\\`` to every absolute path, see:\n\n* `https://msdn.microsoft.com/en-us/library/aa365247.aspx#maxpath `_\n\nThe **Path2()** class has the additional property **extended_path**:\n\n::\n\n >>> from pathlib_revised import Path2\n >>> p=Path2(\"c:\\foo\\bar\")\n >>> p.extended_path\n '\\\\?\\c:\\foo\\bar'\n\nAll existing methods of **Path2()** will internally use **extended_path**, so that the **MAX_PATH** limit is not longer a problem.\n\n**extended_path** exist also under Posix-Systems, but it's the same as **path**:\n\n::\n\n >>> p=Path2(\"/foo/bar\")\n >>> p.path\n '/foo/bar'\n >>> p.extended_path\n '/foo/bar'\n\nAdditional methods\n==================\n\n* os.**`listdir() `_**\n\n
\n>>> Path2(\"/\").listdir()\n['sbin', 'boot', 'tmp', 'sys', 'var', 'dev', 'usr', 'root', 'home', ..., 'initrd.img', 'vmlinuz']\n
* shutil.**`copyfile() `_**\n\n
\n>>> Path2(\"a_file.txt\").copyfile(Path2(\"a_file_copy.txt\"))\n
* os.path.**`expanduser() `_**\n\n
\n>>> p=Path2(\"~\", \"sub\", \"dir\")\n>>> p\nPosixPath2('~/sub/dir')\n>>> p.expanduser()\nPosixPath2('/home/username/sub/dir')\n
* os.**`link() `_**\n\n
\n>>> Path2(\"source.txt\").link(Path2(\"hardlinked.txt\"))\n
* os.**`makedirs() `_**\n\n
\n>>> Path2(\"a\", \"new\", \"path\").makedirs()\n
* os.**`utime() `_**\n\n
\n>>> mtime = 111111111 # UTC: 1973-07-10 00:11:51\n>>> atime = 222222222 # UTC: 1977-01-16 01:23:42\n\n>>> p.Path2(\"dir/or/file\")\n>>> p.utime(times=(atime, mtime))\n>>> stat = p.stat()\n>>> stat.st_atime\n222222222\n>>> stat.st_mtime\n111111111\n
* os.**`scandir() `_**\n\n
\n>>> p=Path2(\"/foo/bar\")\n>>> for dir_item in p.scandir():\n...     print(dir_item)\n...\n\n\n\n
It's a generator that yields os.**`DirEntry `_** instances.\n**scandir** is new in Python 3.5, but in Path2() is will fall-back to the external `scandir `_ module.\n\nYou miss a method? Please, fork, implement, add tests and send a pull request! ;)\n\nmisc\n====\n\nPath2() hat the **.path** property, that is normally new in Python 3.4.5 and 3.5.2\nSo you can use it with older Python Version, too.\n\n------------\nDirEntryPath\n------------\n\nThe `DirEntryPath`_ holds more cached information:\n\n+----------------------------+-------------------------------------------------------------------------+\n| *instance***.dir_entry** | os.DirEntry() instance |\n+----------------------------+-------------------------------------------------------------------------+\n| *instance***.path** | str or bytes of the path, from: *os.DirEntry()***.path** |\n+----------------------------+-------------------------------------------------------------------------+\n| *instance***.is_symlink | bool from *os.DirEntry()***.is_symlink()** |\n+----------------------------+-------------------------------------------------------------------------+\n| *instance***.is_file | bool from *os.DirEntry()***.is_file(follow_symlinks=False)** |\n+----------------------------+-------------------------------------------------------------------------+\n| *instance***.is_dir | bool from *os.DirEntry()***.is_dir(follow_symlinks=False)** |\n+----------------------------+-------------------------------------------------------------------------+\n| *instance***.stat | bool from *os.DirEntry()***.stat(follow_symlinks=False)** |\n+----------------------------+-------------------------------------------------------------------------+\n| *instance***.path_instance | **Path2()** instance |\n+----------------------------+-------------------------------------------------------------------------+\n| *instance***.resolved_path | **Path2()** instance from **.resolve()** (If resolve errored: **None**) |\n+----------------------------+-------------------------------------------------------------------------+\n| *instance***.resolve_error | The error Instance, if .resolve() failed. |\n+----------------------------+-------------------------------------------------------------------------+\n\nCreate a instance by feeding a `os.DirEntry`_ instance, e.g.:\n\n::\n\n >>> from pathlib_revised import Path2, DirEntryPath\n >>> src_path = Path2(\"foo/\")\n >>> for dir_entry in src_path.scandir():\n ... dir_entry_path = DirEntryPath(dir_entry)\n ... print(dir_entry_path.pformat())\n *** :\n path.......: 'foo/file1'\n path instance..: PosixPath2('foo/file1')\n resolved path..: PosixPath2('/home/bar/foo/file1')\n resolve error..: None\n different path.: True\n is symlink.....: False\n is file........: False\n is dir.........: True\n stat.size......: 38\n *** :\n path.......: 'foo/BrokenSymlink.ext'\n path instance..: PosixPath2('foo/BrokenSymlink.ext')\n resolved path..: None\n resolve error..: FileNotFoundError(2, 'No such file or directory')\n different path.: True\n is symlink.....: True\n is file........: False\n is dir.........: False\n stat.size......: 15\n *** :\n path.......: 'foo/README.creole'\n path instance..: PosixPath2('foo/README.creole')\n resolved path..: PosixPath2('/home/bar/foo/README.creole')\n resolve error..: None\n different path.: True\n is symlink.....: False\n is file........: True\n is dir.........: False\n stat.size......: 4802\n\n-------\nHistory\n-------\n\n* 08.02.2016 - v0.1.0\n\n * code cleanup + more tests\n\n * move files form `PyHardLinkBackup `_\n\n-----\nLinks\n-----\n\n* `https://pypi.python.org/pypi/pathlib_revised/ `_", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jedie/pathlib_revised", "keywords": "pathlib Windows Linux", "license": "GNU General Public License (GNU GPL v3 or above)", "maintainer": "", "maintainer_email": "", "name": "pathlib-revised", "package_url": "https://pypi.org/project/pathlib-revised/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pathlib-revised/", "project_urls": { "Homepage": "https://github.com/jedie/pathlib_revised" }, "release_url": "https://pypi.org/project/pathlib-revised/0.1.0/", "requires_dist": [ "scandir; python_version==\"3.4\"" ], "requires_python": "", "summary": "pathlib_revised is a enhanced version of pathlib", "version": "0.1.0" }, "last_serial": 5832620, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "f1fa940bbe0f02f898e93b356b6f399e", "sha256": "887b1fcb9568d45f6051bb5ff1c403fba5ec344e5280d2175e22b63166af2cc7" }, "downloads": -1, "filename": "pathlib_revised-0.0.1-py3.4.egg", "has_sig": false, "md5_digest": "f1fa940bbe0f02f898e93b356b6f399e", "packagetype": "bdist_egg", "python_version": "3.4", "requires_python": null, "size": 9160, "upload_time": "2016-02-08T18:20:44", "url": "https://files.pythonhosted.org/packages/c6/3c/af083d04e928a8a7cc8ee2fdf8b96b31e22df5568fe00f69805b343d69d0/pathlib_revised-0.0.1-py3.4.egg" }, { "comment_text": "", "digests": { "md5": "232df56ce4a2fd7072a858db86f692ac", "sha256": "62593d156fed87044f0eb608bb91ee6387629e0d19276bb3b5fcb8afcd05f28a" }, "downloads": -1, "filename": "pathlib_revised-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "232df56ce4a2fd7072a858db86f692ac", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10923, "upload_time": "2016-02-08T18:20:34", "url": "https://files.pythonhosted.org/packages/4d/3a/ee1930d8c021dd2b89dd69fd0629a24a3b4406501b64bb83e04d3858ed58/pathlib_revised-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "07be807671661745feb6ea428aec0a82", "sha256": "6f64e0a9f0fd53d6bfa0262b54e44523c4d419a88887775384302e69194c7728" }, "downloads": -1, "filename": "pathlib_revised-0.0.1.tar.gz", "has_sig": false, "md5_digest": "07be807671661745feb6ea428aec0a82", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9466, "upload_time": "2016-02-08T18:20:40", "url": "https://files.pythonhosted.org/packages/9a/d7/f9c906b9d89b4f40f0c06036b1766b0ff7184fa3595690598d6daad14299/pathlib_revised-0.0.1.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "5dc00a6d2b48927c97874d217facf410", "sha256": "d38bedcd2077950043615929b021aae905b6163de66f678656bee2c8b8ea1215" }, "downloads": -1, "filename": "pathlib_revised-0.1.0-py3.4.egg", "has_sig": false, "md5_digest": "5dc00a6d2b48927c97874d217facf410", "packagetype": "bdist_egg", "python_version": "3.4", "requires_python": null, "size": 11458, "upload_time": "2016-02-08T22:10:29", "url": "https://files.pythonhosted.org/packages/20/a2/31d98d5770f2f476722bc08ff2b37eb2429bc1a385e5dba7a9caacccb9d0/pathlib_revised-0.1.0-py3.4.egg" }, { "comment_text": "", "digests": { "md5": "e6a77b92fc97187a4c0258e32d70975f", "sha256": "fd59a14410b682c1d6ed0210ada131469b0a51363d4261008cbf595a67118cd9" }, "downloads": -1, "filename": "pathlib_revised-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "e6a77b92fc97187a4c0258e32d70975f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 15054, "upload_time": "2016-02-08T22:10:15", "url": "https://files.pythonhosted.org/packages/6d/85/900c47c9ea8c0a9a972fcdbda859877cfa047157efdf566dc0300e84ac2b/pathlib_revised-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "43829dc4ee27171c4fc0ba89b8c00134", "sha256": "4c3528dbdd66cd1582242319648c921ff9552bec789c970ff1b628a66df8824c" }, "downloads": -1, "filename": "pathlib_revised-0.1.0.tar.gz", "has_sig": false, "md5_digest": "43829dc4ee27171c4fc0ba89b8c00134", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13085, "upload_time": "2016-02-08T22:10:23", "url": "https://files.pythonhosted.org/packages/78/9e/1fa9eb70f60e5808af185004ac98d417a5e52b979ff354f228fb4544a52f/pathlib_revised-0.1.0.tar.gz" } ], "0.2.0rc1": [ { "comment_text": "", "digests": { "md5": "e7aa64abd5399a90908f990a50dafcf6", "sha256": "95af505713fc90807a6f88e00605cbdc6f8340e9a96f1e2fff8a76c8276e0015" }, "downloads": -1, "filename": "pathlib_revised-0.2.0rc1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e7aa64abd5399a90908f990a50dafcf6", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 24432, "upload_time": "2019-09-15T17:39:12", "url": "https://files.pythonhosted.org/packages/1b/67/4eea35ceb85a772f0a7074ce5d34b7bfb854f5f02122f0910e1ca8ecba28/pathlib_revised-0.2.0rc1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ac4887514535c2433845c648447fbd8c", "sha256": "1175436e7610436c70863e02779faa9f9715c900d9c96bbb0c0a4411ae3c2439" }, "downloads": -1, "filename": "pathlib_revised-0.2.0rc1-py3.6.egg", "has_sig": false, "md5_digest": "ac4887514535c2433845c648447fbd8c", "packagetype": "bdist_egg", "python_version": "3.6", "requires_python": null, "size": 12381, "upload_time": "2019-09-15T17:39:16", "url": "https://files.pythonhosted.org/packages/76/0b/6cca7228e3005311d2b381f9d3c5b6856ab468bd16f2688f83a15a42b3b7/pathlib_revised-0.2.0rc1-py3.6.egg" }, { "comment_text": "", "digests": { "md5": "103ad51babd50806af55db107584c37f", "sha256": "b8e1f1ea5d6af91adb19a1cf31f31a857f94c6eefda32af577b66f2a6a6fbbfd" }, "downloads": -1, "filename": "pathlib_revised-0.2.0rc1.tar.gz", "has_sig": false, "md5_digest": "103ad51babd50806af55db107584c37f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 75861, "upload_time": "2019-09-15T17:39:14", "url": "https://files.pythonhosted.org/packages/01/9a/d17597b0484c0bcb38759baa039e3ff4a7343a9e45c2a1ca1e96e43c5e86/pathlib_revised-0.2.0rc1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5dc00a6d2b48927c97874d217facf410", "sha256": "d38bedcd2077950043615929b021aae905b6163de66f678656bee2c8b8ea1215" }, "downloads": -1, "filename": "pathlib_revised-0.1.0-py3.4.egg", "has_sig": false, "md5_digest": "5dc00a6d2b48927c97874d217facf410", "packagetype": "bdist_egg", "python_version": "3.4", "requires_python": null, "size": 11458, "upload_time": "2016-02-08T22:10:29", "url": "https://files.pythonhosted.org/packages/20/a2/31d98d5770f2f476722bc08ff2b37eb2429bc1a385e5dba7a9caacccb9d0/pathlib_revised-0.1.0-py3.4.egg" }, { "comment_text": "", "digests": { "md5": "e6a77b92fc97187a4c0258e32d70975f", "sha256": "fd59a14410b682c1d6ed0210ada131469b0a51363d4261008cbf595a67118cd9" }, "downloads": -1, "filename": "pathlib_revised-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "e6a77b92fc97187a4c0258e32d70975f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 15054, "upload_time": "2016-02-08T22:10:15", "url": "https://files.pythonhosted.org/packages/6d/85/900c47c9ea8c0a9a972fcdbda859877cfa047157efdf566dc0300e84ac2b/pathlib_revised-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "43829dc4ee27171c4fc0ba89b8c00134", "sha256": "4c3528dbdd66cd1582242319648c921ff9552bec789c970ff1b628a66df8824c" }, "downloads": -1, "filename": "pathlib_revised-0.1.0.tar.gz", "has_sig": false, "md5_digest": "43829dc4ee27171c4fc0ba89b8c00134", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13085, "upload_time": "2016-02-08T22:10:23", "url": "https://files.pythonhosted.org/packages/78/9e/1fa9eb70f60e5808af185004ac98d417a5e52b979ff354f228fb4544a52f/pathlib_revised-0.1.0.tar.gz" } ] }