{ "info": { "author": "Kevin Sacca", "author_email": "ssriceboat@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Build Tools" ], "description": "riceprint\n=========\n\n|shield1| |shield2| |shield3| |shield4| |shield5|\n\n.. |shield1| image:: https://img.shields.io/github/release/ssriceboat/ricekey.svg?color=blue\n :width: 20%\n\n.. |shield2| image:: https://img.shields.io/badge/Python-%3E=3.5-blue.svg?color=e6ac00\n :width: 20%\n\n.. |shield3| image:: https://img.shields.io/badge/platform-Windows%20%7C%20macOS%20%7C%20Linux-lightgrey.svg\n :width: 24%\n\n.. |shield4| image:: https://img.shields.io/github/license/ssriceboat/ricekey.svg?color=blue\n :width: 20%\n\n.. |shield5| image:: https://img.shields.io/pypi/dm/ricekey.svg?color=blueviolet\n :width: 20%\n\nAbout\n=====\n\nAuthor: Kevin Sacca ssriceboat@gmail.com\n\nA simple threaded Python keypress event detector for stopping loops or other threads. Effective for safely stopping large for-loops, continuous functions, and enabling keypress directives for GUIs.\n\nWorks on Linux, macOS, Windows.\n\nLicense\n=======\n\nMIT License\n\nCopyright (c) 2019 ssriceboat\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be included\nin all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nInstallation using pip\n======================\n\n.. code:: bash\n\n pip install ricekey\n\nUsage:\n======\n\nAfter you have installed the package, check that its working by running\nthe module directly. This will demonstrate an example keypress kill event.\n\n.. code:: bash\n\n cd /path/to/ricekey-package/src/ricekey/\n python ricekey.py\n\nBelow is an example of how you can use ricekey to stop your main thread if you need to:\n\n.. code:: python\n\n from ricekey import kbcontrol\n from riceprint import ConsolePrinter, pprint, tprint, progressbar\n cp = ConsolePrinter()\n import threading\n import time\n\n # Start the keypress monitoring thread\n thread = threading.Thread(target=kbcontrol, args=())\n thread.start()\n\n # While the thread is alive, do something.\n i = 0\n while thread.isAlive():\n c = cp.palette.colors[i % 16]\n progressbar(i%100, 100, color=c, char='\\u2587', lend='|', rend='|')\n time.sleep(0.01)\n i+=1\n\n pprint('Done! I hope you use this package!', 'dm')", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ssriceboat/ricekey", "keywords": "console terminal shell python key press keypress event", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "ricekey", "package_url": "https://pypi.org/project/ricekey/", "platform": "", "project_url": "https://pypi.org/project/ricekey/", "project_urls": { "Homepage": "https://github.com/ssriceboat/ricekey" }, "release_url": "https://pypi.org/project/ricekey/1.0.1/", "requires_dist": null, "requires_python": "", "summary": "OS-agnostic threaded keypress event detector for killing loops.", "version": "1.0.1" }, "last_serial": 5537801, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "4c5b00b9eb1b2adb40d8e465134878bc", "sha256": "f3aa1483c9bc1185454842fe250a70c48c5aadf48352ebd65077d39bcb4c61fb" }, "downloads": -1, "filename": "ricekey-1.0.0.tar.gz", "has_sig": false, "md5_digest": "4c5b00b9eb1b2adb40d8e465134878bc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4328, "upload_time": "2019-07-15T04:13:52", "url": "https://files.pythonhosted.org/packages/f0/61/a4dda5f1074f02e23cb922acdb3796e4da46081b1afbc3a09a8a4e070e4b/ricekey-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "f7e54de5f30da6f39f8abbf1f0aa6ca8", "sha256": "a20bece53d5c3c47e5bd4c018f945c3749243c18a349675f9ae0619c09aec6c9" }, "downloads": -1, "filename": "ricekey-1.0.1.tar.gz", "has_sig": false, "md5_digest": "f7e54de5f30da6f39f8abbf1f0aa6ca8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4320, "upload_time": "2019-07-16T01:34:33", "url": "https://files.pythonhosted.org/packages/2a/67/4e6df7a0af46bae45da485c0f3240e72229a94d43bcfb004e9ceaf2d07dc/ricekey-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f7e54de5f30da6f39f8abbf1f0aa6ca8", "sha256": "a20bece53d5c3c47e5bd4c018f945c3749243c18a349675f9ae0619c09aec6c9" }, "downloads": -1, "filename": "ricekey-1.0.1.tar.gz", "has_sig": false, "md5_digest": "f7e54de5f30da6f39f8abbf1f0aa6ca8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4320, "upload_time": "2019-07-16T01:34:33", "url": "https://files.pythonhosted.org/packages/2a/67/4e6df7a0af46bae45da485c0f3240e72229a94d43bcfb004e9ceaf2d07dc/ricekey-1.0.1.tar.gz" } ] }