{ "info": { "author": "Andrew Udvare", "author_email": "audvare@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "``filesystem`` module\n=====================\n\n.. code:: python\n\n import filesystem as fs\n\nTesting if a path is a file (shortcut for ``try``/``with open``):\n-----------------------------------------------------------------\n\n.. code:: python\n\n fs.isfile('something')\n fs.isfile('something', mode='r')\n\nShortcut for ``rsync -a``\n-------------------------\n\nUses ```sh`` module `__.\n\n.. code:: python\n\n fs.sync('name@somehost:~/somedir/', 'local_path')\n fs.sync('~/somedir', '.')\n\nReturns exit code and does not catch any exceptions raised by ``sh``.\n\nCheck if a file is the same based on modified time\n--------------------------------------------------\n\nExample use: determine if a file is the same based on a ``HEAD`` HTTP\nrequest using the ``Last-Modified`` header.\n\n.. code:: python\n\n from urllib2.request import urlopen\n\n req = urlopen('http://i.imgur.com/sgon5YP.jpg')\n req.get_method = lambda: 'HEAD'\n last_modified = None\n\n for line in str(req.info()).split('\\n'):\n if 'last-modified' in line.lower():\n last_modified = line.split(': ')[1].strip()\n last_modified = time.strptime(last_modified.replace(' GMT', ''), '%a, %d %b %Y %H:%M:%S')\n break\n\n # Actual check\n fs.has_same_time('./sgon5YP.jpg', last_modified)\n\nDelete a set of files\n---------------------\n\nUse ``fs.rm_files(list_of_files, raise_on_error=bool_val)``.\n\n``pushd`` usage with the ``with`` statement\n===========================================\n\n.. code:: python\n\n from osext.pushdcontext import pushd\n\n with pushd('some_dir') as context:\n pass", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://pypi.python.org/pypi/OSExtension/", "keywords": null, "license": "LICENSE.txt", "maintainer": null, "maintainer_email": null, "name": "OSExtension", "package_url": "https://pypi.org/project/OSExtension/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/OSExtension/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://pypi.python.org/pypi/OSExtension/" }, "release_url": "https://pypi.org/project/OSExtension/0.1.5/", "requires_dist": null, "requires_python": null, "summary": "Extension for os module, for POSIX systems only", "version": "0.1.5" }, "last_serial": 1377195, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "141a63cec7e682d74c2035e74873a097", "sha256": "b46c559d09a0fca52f0bd053711eb1782b1f336e4a1be2e5abe1070264bebce0" }, "downloads": -1, "filename": "OSExtension-0.1.0.tar.gz", "has_sig": false, "md5_digest": "141a63cec7e682d74c2035e74873a097", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1899, "upload_time": "2013-11-19T01:14:47", "url": "https://files.pythonhosted.org/packages/36/41/c1f0c449fafa1412c8c789a2195f2abeb717dbc05c83a28b01fce90d279c/OSExtension-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "4a3672795d8de8e5fa2b0d3115d6b626", "sha256": "643edf59a24195b59724be39a98dff7730c661f9ec5052b10bbb47d5ffd57d3c" }, "downloads": -1, "filename": "OSExtension-0.1.1.tar.gz", "has_sig": false, "md5_digest": "4a3672795d8de8e5fa2b0d3115d6b626", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1993, "upload_time": "2013-11-19T01:39:06", "url": "https://files.pythonhosted.org/packages/76/3c/9be1d207fdde5c7ac15b555ee8ae5a9fdb64179c103f5999b5a3ec6dda73/OSExtension-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "18dbb9b1c07979bb0514ce4e0a28af3d", "sha256": "ccaa6697a1cc4adbabf0f5d319b514a2c5ccf2aae7377fe297e9de8892cab345" }, "downloads": -1, "filename": "OSExtension-0.1.2.tar.gz", "has_sig": false, "md5_digest": "18dbb9b1c07979bb0514ce4e0a28af3d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2752, "upload_time": "2013-11-29T03:23:18", "url": "https://files.pythonhosted.org/packages/93/92/8610cb6ce03821839374b3ed18cf83a8474c19ae7ee8e286b94bd70f6b42/OSExtension-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "537591e07023d7b17ccc5c1771f42252", "sha256": "f1be35ff65c068009b1c28056c80950b81bc1499cbc7b47b374dc488ba361436" }, "downloads": -1, "filename": "OSExtension-0.1.3.tar.gz", "has_sig": false, "md5_digest": "537591e07023d7b17ccc5c1771f42252", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2808, "upload_time": "2014-06-15T04:23:55", "url": "https://files.pythonhosted.org/packages/81/f5/5fdd12c2605448c235ed165df43042b16670c43f465810346616b5fc7fc3/OSExtension-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "fbd93f2e142246fe016ba7b5c00734b9", "sha256": "0a20b745d0def3c6b3628b23fd2e4f2d9a3f927c8cfa8f9e5f13560698f64114" }, "downloads": -1, "filename": "OSExtension-0.1.4.tar.gz", "has_sig": false, "md5_digest": "fbd93f2e142246fe016ba7b5c00734b9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3052, "upload_time": "2015-01-08T19:44:58", "url": "https://files.pythonhosted.org/packages/c1/6a/9ab3bdb1655a40f47df63c36e78baad5435e42a511727cf43d792c539ad4/OSExtension-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "cc08884007eb5648fa8c29a2c333bf7b", "sha256": "646550ff2a221c5d4d2109c556f24698f20aa5fa610f6d5ac4679853f905b7c0" }, "downloads": -1, "filename": "OSExtension-0.1.5.tar.gz", "has_sig": false, "md5_digest": "cc08884007eb5648fa8c29a2c333bf7b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3057, "upload_time": "2015-01-09T20:33:17", "url": "https://files.pythonhosted.org/packages/e2/50/8be93935690a00edf4f6a0e6c114bed9a77f5c4ac1585f7cf9892a20c54a/OSExtension-0.1.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "cc08884007eb5648fa8c29a2c333bf7b", "sha256": "646550ff2a221c5d4d2109c556f24698f20aa5fa610f6d5ac4679853f905b7c0" }, "downloads": -1, "filename": "OSExtension-0.1.5.tar.gz", "has_sig": false, "md5_digest": "cc08884007eb5648fa8c29a2c333bf7b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3057, "upload_time": "2015-01-09T20:33:17", "url": "https://files.pythonhosted.org/packages/e2/50/8be93935690a00edf4f6a0e6c114bed9a77f5c4ac1585f7cf9892a20c54a/OSExtension-0.1.5.tar.gz" } ] }