{ "info": { "author": "Ilya Kulakov", "author_email": "kulakov.ilya@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: POSIX", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: System :: Logging", "Topic :: System :: Systems Administration", "Topic :: System :: System Shells", "Topic :: Text Processing" ], "description": ".. image:: https://travis-ci.org/GreatFruitOmsk/tailhead.svg?branch=master\n\n======\ntailhead\n======\n\nPython tail is a simple implementation of GNU tail and head. \n\nIt provides 3 main functions that can be performed on any file-like object that supports ``seek()`` and ``tell()``.\n\n* ``tail`` - read lines from the end of a file\n* ``head`` - read lines from the top of a file\n* ``follow`` - read lines as a file grows\n\nIt also comes with ``pytail``, a command line version offering the same functionality as GNU tail. This can be particularly useful on Windows systems that have no tail equivalent.\n\n- `tailhead on GitHub `_\n- `tailhead on Pypi `_\n\nInstallation\n============\n\nInstall with ``pip`` or ``easy_install``.\n\n::\n\n pip install tailhead\n\nExamples\n========\n\n::\n\n import tailhead\n f = open('test.txt', 'w')\n for i in range(11):\n f.write('Line %d\\\\n' % (i + 1))\n f.close()\n \nTail\n----\n::\n\n # Get the last 3 lines of the file\n tailhead.tail(open('test.txt'), 3)\n # ['Line 9', 'Line 10', 'Line 11']\n\nHead\n----\n::\n\n # Get the first 3 lines of the file\n tailhead.head(open('test.txt'), 3)\n # ['Line 1', 'Line 2', 'Line 3']\n\nFollow\n------\n::\n\n # Follow the file as it grows\n for line in tailhead.follow_path('test.txt'):\n if line is not None:\n print(line)\n else:\n # sleep\n\nRunning Tests\n=============\n\nTailer currently only has doctests.\n\nRun tests with nose::\n\n nosetests --with-doctest tailhead\n\nRun tests with doctest::\n\n python -m doctest -v tailhead/__init__.py", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/GreatFruitOmsk/tailhead/releases", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/GreatFruitOmsk/tailhead", "keywords": "tail,head", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "tailhead", "package_url": "https://pypi.org/project/tailhead/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/tailhead/", "project_urls": { "Download": "https://github.com/GreatFruitOmsk/tailhead/releases", "Homepage": "https://github.com/GreatFruitOmsk/tailhead" }, "release_url": "https://pypi.org/project/tailhead/1.0.2/", "requires_dist": null, "requires_python": null, "summary": "tailhead is a simple implementation of GNU tail and head.", "version": "1.0.2" }, "last_serial": 1801097, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "c0b4838ea661d5567d6a4f7efa8a32ad", "sha256": "c1c04fb12d3e8569aee109ea299c6cffb222b40b1ea4ee0e80dd2ae82ad99a14" }, "downloads": -1, "filename": "tailhead-1.0.0.tar.gz", "has_sig": false, "md5_digest": "c0b4838ea661d5567d6a4f7efa8a32ad", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7452, "upload_time": "2015-08-11T18:44:50", "url": "https://files.pythonhosted.org/packages/55/73/591f9e2dccecce68e68400d8dc6500fa3fdb66735ba35a55e3b23adabebc/tailhead-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "7a9566ffca50264b563054fb16c47493", "sha256": "e2801d2c5af89de34375479915200f086b6a028cbd0d1b444c52c31bbcbd8f8d" }, "downloads": -1, "filename": "tailhead-1.0.1.tar.gz", "has_sig": false, "md5_digest": "7a9566ffca50264b563054fb16c47493", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7528, "upload_time": "2015-09-16T17:07:07", "url": "https://files.pythonhosted.org/packages/54/7e/aa5b582386c59e2b4f869ba28752e42add3fc6725dbbf0cd32e83e257bdb/tailhead-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "81f86439720ce9e22660b7edc148dee9", "sha256": "916f70583494f38009410f178c3aea3f3b5e3f3b9c2d83f643547b2651147a03" }, "downloads": -1, "filename": "tailhead-1.0.2.tar.gz", "has_sig": false, "md5_digest": "81f86439720ce9e22660b7edc148dee9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7520, "upload_time": "2015-11-04T17:24:37", "url": "https://files.pythonhosted.org/packages/17/ef/d07d5a05e490f1b2ef7e5914e61ea222165ae76356a701551a1fd24b1dfc/tailhead-1.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "81f86439720ce9e22660b7edc148dee9", "sha256": "916f70583494f38009410f178c3aea3f3b5e3f3b9c2d83f643547b2651147a03" }, "downloads": -1, "filename": "tailhead-1.0.2.tar.gz", "has_sig": false, "md5_digest": "81f86439720ce9e22660b7edc148dee9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7520, "upload_time": "2015-11-04T17:24:37", "url": "https://files.pythonhosted.org/packages/17/ef/d07d5a05e490f1b2ef7e5914e61ea222165ae76356a701551a1fd24b1dfc/tailhead-1.0.2.tar.gz" } ] }