{ "info": { "author": "Logan", "author_email": "logan.zartman@utexas.edu", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# termpixels\n*the terminal as a character-cell matrix*\n\n[![Build Status](https://github.com/loganzartman/termpixels/workflows/build/badge.svg)](https://github.com/loganzartman/termpixels/actions)\n[![Code Coverage](https://codecov.io/gh/loganzartman/termpixels/branch/master/graph/badge.svg)](https://codecov.io/gh/loganzartman/termpixels)\n\n## Get it\n[This project is on PyPI][pypi].\n\nAlternatively, clone this repository and `pip install -e .` in the root directory.\n\nRequires Python 3, and **no dependencies**\\*!\n\n\\* Requires [`pytest`](https://pypi.org/project/pytest/) to run tests\n\n## Purpose\nCreating programs that run inside of terminals seems convoluted. The goal of termpixels is to **abstract the terminal into a 2D array of \"pixels\"**, or character cells, which each contain a single text character, a foreground color, and a background color. termpixels allows you to modify the screen contents anywhere, at any time, and then handles updating the terminal automatically, as well as simplifying complicated terminal input processing.\n\nUltimately, this project seeks to make the terminal *more accessible* and *more fun*.\n\n## Limitations\nThere are lots of great libraries for coloring terminal output. This one is **designed for full-screen applications** that completely control the contents of the screen. That means that it, e.g., automatically saves and clears the screen, resets the cursor position, and accepts input in cbreak mode.\n\nIt's not the best solution for simply printing colored text, though [you can do that if you want][text coloring].\n\n## Demo\n![Demo gif](fun-text.gif)\n```python\nfrom termpixels import App, Color\nfrom time import time\nfrom math import sin\n\nclass FunTextApp(App):\n def on_frame(self):\n self.screen.clear() # remove everything from the screen\n text = \"Hello world, from termpixels!\"\n\n for i, c in enumerate(text):\n f = i / len(text)\n color = Color.hsl(f + time(), 1, 0.5) # create a color from a hue value\n x = self.screen.w // 2 - len(text) // 2 # horizontally center the text\n offset = sin(time() * 3 + f * 5) * 2 # some arbitrary math\n y = round(self.screen.h / 2 + offset) # vertical center with an offset\n self.screen.print(c, x + i, y, fg=color) # draw the text to the screen buffer\n\n self.screen.update() # commit the changes to the screen\n\nif __name__ == \"__main__\":\n FunTextApp().start()\n```\n\n### More demos\n* [DoomTerm](https://github.com/loganzartman/doomterm)\n* [tpmatrix](https://github.com/loganzartman/tpmatrix)\n\n## Features\n* **Unix** (and **Mac**) terminal feature detection with terminfo (via Python [curses][python-curses])\n* **Windows** support through Win32 Console API\n* Terminal (re)**size detection**\n* Asynchronous input\n\t* **Keyboard** input with support for special keys like arrows, function keys, escape, etc.\n\t* **Mouse** click, scroll and move input in terminals supporting xterm mouse\n* 16, 256, and true **color** output (with detection for best supported mode)\n* Display the **cursor** anywhere (or hide it!)\n* **Preserves** the state of the user's terminal using alternate screen buffer.\n* Rudimentary support for **fullwidth** characters.\n* No reliance on ncurses except for terminfo lookup\n* 100% Python\n* and more\n\n## Inspiration\n* [tcell][tcell]\n* [ncurses][ncurses]\n* [Build your own Command Line][byocl]\n\n[python-curses]: https://docs.python.org/3/howto/curses.html\n[tcell]: https://github.com/gdamore/tcell\n[ncurses]: https://www.gnu.org/software/ncurses/\n[pypi]: https://pypi.org/project/termpixels/\n[byocl]: http://www.lihaoyi.com/post/BuildyourownCommandLinewithANSIescapecodes.html\n[text coloring]: https://github.com/loganzartman/termpixels/blob/master/termpixels/examples/simple_text_coloring.py\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/loganzartman/termpixels", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "termpixels", "package_url": "https://pypi.org/project/termpixels/", "platform": "", "project_url": "https://pypi.org/project/termpixels/", "project_urls": { "Homepage": "https://github.com/loganzartman/termpixels" }, "release_url": "https://pypi.org/project/termpixels/0.0.11/", "requires_dist": null, "requires_python": "", "summary": "Terminal I/O with a pixel-like abstraction", "version": "0.0.11" }, "last_serial": 5772820, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "c21ade5af2aebb653a9a4ad85108032f", "sha256": "c7eddbfddee16a97b1a84bf90c2e7ceb1241fedb5302c69675b9ae236054b2a5" }, "downloads": -1, "filename": "termpixels-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "c21ade5af2aebb653a9a4ad85108032f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9768, "upload_time": "2019-02-25T09:05:44", "url": "https://files.pythonhosted.org/packages/81/dc/9465476929892a08f0db00d1aaed6c05390c8908f34f66c1481471ea6dd2/termpixels-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d606872b11d1fa0b2938efd879c41125", "sha256": "c15f76f751bf6d38dfad42f7f6e648111c773925deb636d5abab5575d81839a0" }, "downloads": -1, "filename": "termpixels-0.0.1.tar.gz", "has_sig": false, "md5_digest": "d606872b11d1fa0b2938efd879c41125", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6786, "upload_time": "2019-02-25T09:05:46", "url": "https://files.pythonhosted.org/packages/4b/96/d52f5ecc1ccb726e06c969858775889a3e3e820e9edf0d9a02587d699f4f/termpixels-0.0.1.tar.gz" } ], "0.0.10": [ { "comment_text": "", "digests": { "md5": "b35f1825ae67faa5d84cc13b3da0b18f", "sha256": "6aa31de5d4af3fbeae8b6ac9a5b8c7861bc48704ed02d475d484f95557a9f612" }, "downloads": -1, "filename": "termpixels-0.0.10-py3-none-any.whl", "has_sig": false, "md5_digest": "b35f1825ae67faa5d84cc13b3da0b18f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 24987, "upload_time": "2019-08-31T21:26:29", "url": "https://files.pythonhosted.org/packages/14/bf/6b35e419b921d3bd3a65d6ab3a21fe7ec964c830bed3783ac85fb18c533e/termpixels-0.0.10-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "39b8c7fb94257b9648be812fe0d0b073", "sha256": "9c81ee9613b011099847d6174786f33251c6e338c184cf4eb36a5095efefbdd2" }, "downloads": -1, "filename": "termpixels-0.0.10.tar.gz", "has_sig": false, "md5_digest": "39b8c7fb94257b9648be812fe0d0b073", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21354, "upload_time": "2019-08-31T21:26:31", "url": "https://files.pythonhosted.org/packages/0f/2b/c5d0644263fb7c55ce16ada51e8ac235c5e148ea56b32f7e2075a30518e7/termpixels-0.0.10.tar.gz" } ], "0.0.11": [ { "comment_text": "", "digests": { "md5": "897eff9087e81c31cad055516808691b", "sha256": "bcd8cef6ee45539537d50696fad885d0ff1a1dd5047799948b297d4ebfec7c0c" }, "downloads": -1, "filename": "termpixels-0.0.11-py3-none-any.whl", "has_sig": false, "md5_digest": "897eff9087e81c31cad055516808691b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 25171, "upload_time": "2019-09-02T21:48:12", "url": "https://files.pythonhosted.org/packages/d6/9a/bc2d69e937c918634f1ccf8ae85ef9318535bf2894ed4232d210d276e0d2/termpixels-0.0.11-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3ffdfc246a82486c1cbf4d2d8cb1b309", "sha256": "872bfc74f12a9cba4110f708d73afa85d5ee319264b810d44fd7910760804317" }, "downloads": -1, "filename": "termpixels-0.0.11.tar.gz", "has_sig": false, "md5_digest": "3ffdfc246a82486c1cbf4d2d8cb1b309", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21562, "upload_time": "2019-09-02T21:48:14", "url": "https://files.pythonhosted.org/packages/f7/50/c425db5364a9307a430415ead69ad12ba15b2402fc8bf04fe9028f33e97c/termpixels-0.0.11.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "6b1b81b3c03c4f31eccb6924b232c6dc", "sha256": "d53475b8852ae9d675061743decd59bdd7f6401bf7533fb78b4f96915f393beb" }, "downloads": -1, "filename": "termpixels-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "6b1b81b3c03c4f31eccb6924b232c6dc", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10202, "upload_time": "2019-02-25T21:40:27", "url": "https://files.pythonhosted.org/packages/37/e1/da1e9da5a864bfbb4a8c4d8ebd1789f9b955b4a298008e68260e603c899d/termpixels-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cf689279b8eb9c989f889366f1247860", "sha256": "c71888b5a96b48ba2b4304cbc98450e7190c2982301865da59165f7c48dcbb2f" }, "downloads": -1, "filename": "termpixels-0.0.2.tar.gz", "has_sig": false, "md5_digest": "cf689279b8eb9c989f889366f1247860", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7334, "upload_time": "2019-02-25T21:40:29", "url": "https://files.pythonhosted.org/packages/26/04/d72b99d14fb0b35494536cf5c7c5afd72e3c471d70caf6837a5b8980eeab/termpixels-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "daccce059638f5eca3e03bfcf83a0b36", "sha256": "775ab61175c5c15589bf4c7cdba79209ffe1044d7e95ef1b02f8a31dd00c3a37" }, "downloads": -1, "filename": "termpixels-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "daccce059638f5eca3e03bfcf83a0b36", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10428, "upload_time": "2019-03-04T01:24:33", "url": "https://files.pythonhosted.org/packages/2e/be/e2fa9e9a0432d4901ddb36551bf130304eab9c08da7ef45ec76f49bb969a/termpixels-0.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e972b27e53698a29e61a27b0ab49f07e", "sha256": "7cf94484a2919a06a2c67b0f487246803cec0e8de38fa65e1228a151466e340d" }, "downloads": -1, "filename": "termpixels-0.0.3.tar.gz", "has_sig": false, "md5_digest": "e972b27e53698a29e61a27b0ab49f07e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7571, "upload_time": "2019-03-04T01:24:36", "url": "https://files.pythonhosted.org/packages/c9/bf/1fc6ca8104a450c70d7d2adb4496a450471d5bd686a8eee2bfd21c9cc1fe/termpixels-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "c1688b6a180dbc5e76d69d9bf384ebbb", "sha256": "ababbdc8705ae59e53225893338540bfb59a597c259711a015db7ea8b6ded62f" }, "downloads": -1, "filename": "termpixels-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "c1688b6a180dbc5e76d69d9bf384ebbb", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 14954, "upload_time": "2019-03-19T13:29:42", "url": "https://files.pythonhosted.org/packages/a7/9e/32bf4c9452e8787b7dd77ea8f3fba9a43d772c2e10e53257288ad836962d/termpixels-0.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d1a00960adc3915f1517063bbe4221af", "sha256": "e3a7d4b1951f19a2accdd5191092a35827ba844f1992ad027b417f8ffa87ad62" }, "downloads": -1, "filename": "termpixels-0.0.4.zip", "has_sig": false, "md5_digest": "d1a00960adc3915f1517063bbe4221af", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16886, "upload_time": "2019-03-19T13:29:44", "url": "https://files.pythonhosted.org/packages/f0/eb/6c9dcd6b2eb23a0ff52dbef511540abce15b0cb450832dc6828c930a3101/termpixels-0.0.4.zip" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "1fbc97df368976521210d3498169a4d1", "sha256": "d4951ec738ece4f47b88198fa2b180aba95113c1ab66d876f615178354fa7b0d" }, "downloads": -1, "filename": "termpixels-0.0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "1fbc97df368976521210d3498169a4d1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 21397, "upload_time": "2019-03-23T08:27:03", "url": "https://files.pythonhosted.org/packages/a9/03/7f73753b33f18e95366b4abfd7ad06be8c01dd39e0daf76a7ba8a77b72b6/termpixels-0.0.5-py3-none-any.whl" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "010c7e148d112fe0bcb0383486b95b27", "sha256": "615210aa028eddf1434ead6d5cc96d5e4a29a2135a82896712e03a315aa32ff9" }, "downloads": -1, "filename": "termpixels-0.0.6-py3-none-any.whl", "has_sig": false, "md5_digest": "010c7e148d112fe0bcb0383486b95b27", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 21403, "upload_time": "2019-03-23T08:40:33", "url": "https://files.pythonhosted.org/packages/cf/bb/8f2dd17e6b6e819abb677fb6ec479925c035cec7ca4f9c87412551f6b9a2/termpixels-0.0.6-py3-none-any.whl" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "dff0b02083c0eaaa744f1bd4d47a5ecb", "sha256": "a79606094be2bb32694d45b9e607bdea419bac2f4fd0e75019d9c89ca7207753" }, "downloads": -1, "filename": "termpixels-0.0.7-py3-none-any.whl", "has_sig": false, "md5_digest": "dff0b02083c0eaaa744f1bd4d47a5ecb", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 23390, "upload_time": "2019-05-18T22:57:50", "url": "https://files.pythonhosted.org/packages/7c/fc/348b655ffa056c83b2f5e51769a02bdf00ba15cc2e1f2dd330441f984eff/termpixels-0.0.7-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b5a7962c040ebd5d6be9bacd36cd8288", "sha256": "91c1a4a3af30496ceb67d7852d492ae3a4c38e4deb1d0df363922a8ac0200f44" }, "downloads": -1, "filename": "termpixels-0.0.7.tar.gz", "has_sig": false, "md5_digest": "b5a7962c040ebd5d6be9bacd36cd8288", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19876, "upload_time": "2019-05-18T22:57:52", "url": "https://files.pythonhosted.org/packages/7c/3d/802677d8d5cafbe8cc1b5ed83b2c7dd325d0bfc2948a6b739e4328ecfa7d/termpixels-0.0.7.tar.gz" } ], "0.0.8": [ { "comment_text": "", "digests": { "md5": "9b6a19fe115cf336b197459162339682", "sha256": "1eb8c7d51bbaa84a3f97434ba3ca1aa06734ad0d81dc6e517c175157000bf2a0" }, "downloads": -1, "filename": "termpixels-0.0.8-py3-none-any.whl", "has_sig": false, "md5_digest": "9b6a19fe115cf336b197459162339682", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 23117, "upload_time": "2019-05-25T00:31:10", "url": "https://files.pythonhosted.org/packages/80/c9/b68f77e7be801a7d89b00261601578b3dd8d993417c765f1d2ebd0876521/termpixels-0.0.8-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a88dcfc5e47a1e8c8e08283e6695f9c6", "sha256": "4fe39d42a1c6e24a787f2ff8e00cd68321a890bc7544b2bd5758c472530145bd" }, "downloads": -1, "filename": "termpixels-0.0.8.tar.gz", "has_sig": false, "md5_digest": "a88dcfc5e47a1e8c8e08283e6695f9c6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20133, "upload_time": "2019-05-25T00:31:12", "url": "https://files.pythonhosted.org/packages/30/06/4af91c97ffc024a8d12cd55afb1ce8cdcd5f9be4e948c7c95535be617031/termpixels-0.0.8.tar.gz" } ], "0.0.9": [ { "comment_text": "", "digests": { "md5": "ae0f18172bebd7827f60378c53e2c670", "sha256": "7482e9934029dcac2b419f1fb1c4c3bf91c621844fbe4f560793b79039849601" }, "downloads": -1, "filename": "termpixels-0.0.9-py3-none-any.whl", "has_sig": false, "md5_digest": "ae0f18172bebd7827f60378c53e2c670", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 24971, "upload_time": "2019-08-21T05:02:33", "url": "https://files.pythonhosted.org/packages/b1/c6/6790f0cac50d2f9ebd4533ab63d30ccb82ea5923d221fd5cf0a74c305c11/termpixels-0.0.9-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0725f90019c7fee4e0b4280b41cb8c12", "sha256": "80db63eabd5094e64593b82ad1a444a91023781253037ebde5a08240a49a09a3" }, "downloads": -1, "filename": "termpixels-0.0.9.tar.gz", "has_sig": false, "md5_digest": "0725f90019c7fee4e0b4280b41cb8c12", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21026, "upload_time": "2019-08-21T05:02:35", "url": "https://files.pythonhosted.org/packages/1f/d0/d7c018fac780336c694d87a0d5a0637cec69d660795e60d1d50ac3a4c9f7/termpixels-0.0.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "897eff9087e81c31cad055516808691b", "sha256": "bcd8cef6ee45539537d50696fad885d0ff1a1dd5047799948b297d4ebfec7c0c" }, "downloads": -1, "filename": "termpixels-0.0.11-py3-none-any.whl", "has_sig": false, "md5_digest": "897eff9087e81c31cad055516808691b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 25171, "upload_time": "2019-09-02T21:48:12", "url": "https://files.pythonhosted.org/packages/d6/9a/bc2d69e937c918634f1ccf8ae85ef9318535bf2894ed4232d210d276e0d2/termpixels-0.0.11-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3ffdfc246a82486c1cbf4d2d8cb1b309", "sha256": "872bfc74f12a9cba4110f708d73afa85d5ee319264b810d44fd7910760804317" }, "downloads": -1, "filename": "termpixels-0.0.11.tar.gz", "has_sig": false, "md5_digest": "3ffdfc246a82486c1cbf4d2d8cb1b309", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21562, "upload_time": "2019-09-02T21:48:14", "url": "https://files.pythonhosted.org/packages/f7/50/c425db5364a9307a430415ead69ad12ba15b2402fc8bf04fe9028f33e97c/termpixels-0.0.11.tar.gz" } ] }