{ "info": { "author": "Andrew Milton", "author_email": "vindauga@unyx.net", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# Vindauga\n\n## Introduction\nThis is a pure python3 implementation of the BSD licensed C++ Turbo Vision library.\n\n[Vindauga](https://en.wiktionary.org/wiki/vindauga) is the old Norse precursor to the middle english word 'Window'. These are really old windows...\n\nI needed a cross-platform TUI for python for a project, and the projects available worked on Windows or UNIX but not\nboth. I had previously built a version of this by transliteration which was quite frankly awful, so a dust-off began.\n\nThe benefits of this version;\n\n* No dependencies other than curses (See Windows below to have it work in a cmd/powershell window)\n * Will try in Windows Terminal when it arrives (it should work fine)\n* A lot of refactoring to make the code-base somewhat consistent.\n* It uses unicode by default, (so no CP437)\n * See [UTF-Demo](UTF-8-demo.txt) and [Cyrillic Test](examples/cyrillic-test.py)\n * The file viewer works with UTF-8 encoded files, see [UTF-Demo](UTF-8-demo.txt).\n * Unicode data entry however, is a different story, that's still an issue.\n * `gettext` is enabled so you can use the `_()` built-in, there's no extraction now though.\n* Curses mouse works in DOS windows and Cygwin, putty etc.\n* Some stuff is Pythonic. \n * Some is still a little clunky to use, working on that.\n* You can dynamically change the \"resolution\" of the console window to be the size you need.\n * See [`vindauga_demo`](vindauga_demo/vindauga_demo.py) for how.\n * This only works in virtual terminals (including windows CMD).\n* Tested on Mac, Windows, Cygwin, Putty, X-Terms\n * A lot of alt-keys are trapped on mac you have to use ESC-xxx instead.\n* You can open (interactive) shell windows.\n\nI've implemented other widgets like combo-boxes so there's some extra widgets available OOTB.\nI've pulled together the examples and converted them as well, so there's sample code.\nI've tried to keep the original class and method documentation where appropriate.\n\nYou're currently limited to 1024 width windows, you can adjust this in `vindauga.types.draw_buffer` or subclass \n`DrawBuffer` if it's really a problem. If you're doing linear processing of the draw buffer, then it will grow \nwhatever size you want, but if you want them pre-allocated it's 1K.\n\n![demo](docs/screen-show.gif)\n\n### Windows\nIf you want to use it from a command window, using native Python, you'll need to `pip install windows-curses` and it \nwill work fine.\n\nYou'll also need to install the `pywin32` libraries. \n\n`Terminal` has a buffering problem with stdin echoing from cmd prompts. \n\nRunning it in Cygwin doesn't require anything, just use the cygwin python in a mintty window.\n\n\n## Using it\nLook in the [examples](examples) directory for small samples of how to use widgets. \nThe [vindauga_demo](vindauga_demo/vindauga_demo.py) shows how to put it all together into a larger app.\n\nFor the most part, you will want to subclass `Application` and add your own `Menu` objects.\n\nThis [example](examples/background.py) is pretty much as simple as it gets, although it does nothing\nexcept render a background with the default `StatusLine` that lets you `Alt+X` to quit.\n\n```python\n# -*- coding: utf-8 -*-\nfrom vindauga.widgets.application import Application\nfrom vindauga.widgets.desktop import Desktop\n\n\nclass Demo(Application):\n \"\"\"\n How to __change the background _pattern\n \"\"\"\n def __init__(self):\n Desktop.DEFAULT_BACKGROUND = '\u256c'\n super().__init__()\n\n\nif __name__ == '__main__':\n app = Demo()\n app.run()\n\n```\n\n## Issues\n* Events sometimes disappear, particularly mouse clicks from inside PowerShell windows. Click then tab and then the click \narrives.\n* The `Screen` class does too much and needs to be broken up to move IO into it's own hierarchy\n* Lots more testing needs to be added.\n* No console mouse support as yet\n* I haven't collected all the module imports into `__init__.py` I'm not convinced either way yet.\n * That does mean a lot of import lines, but it means you're only importing what you need, and\n what you're using is explicit.\n\n## Contributing\n\n### Python Version\nI'm targetting python 3.7+ (It should work with 3.6 with the `dataclasses` backport)\n\n### Class and Variable Names\n* It doesn't use PEP-8 naming, for various reasons.\n * Naming is camel case\n * Classes are uppercase first; e.g. `ClassName`\n * Variables are lowercase first; e.g. `variableName`\n * Acronyms should be upper class and separated by an underscore to prevent run-on; e.g. `MyHTTP_Service` \n\n### Filenames\n* Filenames should be all lowercase to prevent issues on case-insensitive file systems.\n* It should indicate the main class defined within, with words seperated by underscores e.g. `class_name.py`\n * Runnable filenames (like in examples), should use dash instead of underscore e.g. `my-test.py`\n 1. This prevents accidental importing from them\n 2. Allows you to name an example after widget without conflicting names.\n\n### Hierarchy\nGenerally; \n* Simple views should be under `widgets` \n* Data requests things under `dialogs` \n* Complex things under `gadgets` e.g things that have their own window.\n\nMove things into submodules if they need to span multiple files\n\nIf you make a widget, add a sample use-case into `examples` \n\n### Debugging\nObviously using `print()` isn't going to work, so use the `logging` module and prefix your logger with `vindauga.`\nYou can use `postMessage` from `widgets.message_window` to log into a Vindauga window. \nSee [`info-box.py`](examples/info-box.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/gabbpuy/vindauga", "keywords": "", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "vindauga", "package_url": "https://pypi.org/project/vindauga/", "platform": "", "project_url": "https://pypi.org/project/vindauga/", "project_urls": { "Homepage": "https://github.com/gabbpuy/vindauga" }, "release_url": "https://pypi.org/project/vindauga/0.0.6/", "requires_dist": null, "requires_python": "", "summary": "Cross Platform Text UI library", "version": "0.0.6" }, "last_serial": 5717936, "releases": { "0.0.5": [ { "comment_text": "", "digests": { "md5": "dd1f5301556401c268ca5d0cd51026a8", "sha256": "5c448febed2f11a65417019e3acb0522f965e539521ab3f0bbfd5231549a290d" }, "downloads": -1, "filename": "vindauga-0.0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "dd1f5301556401c268ca5d0cd51026a8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 206197, "upload_time": "2019-07-01T16:34:38", "url": "https://files.pythonhosted.org/packages/ba/60/6e50e560c30b05dc12dc276c04e7b77fe59b12892da853a36335bbe53ad0/vindauga-0.0.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e3cf8b04fbecee6607bdb3f73181d3a8", "sha256": "fa899f297c262b0dbe8efd8f96a688fbfdef5c2efe4b924e6e91ba7dc3478ea8" }, "downloads": -1, "filename": "vindauga-0.0.5.tar.gz", "has_sig": false, "md5_digest": "e3cf8b04fbecee6607bdb3f73181d3a8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 147043, "upload_time": "2019-07-01T16:34:40", "url": "https://files.pythonhosted.org/packages/d4/45/dc635fc726153ea6cf0eacbb7aab441b1b5c07c3bb9aaf8caf3b32bd63e0/vindauga-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "abd8740b3b8822f7f55b543d9eb31973", "sha256": "23e8e39f18ec83becbeb2d170e341761a0b97e0ccf99b970e0cc699c0cfb25b2" }, "downloads": -1, "filename": "vindauga-0.0.6-py3-none-any.whl", "has_sig": false, "md5_digest": "abd8740b3b8822f7f55b543d9eb31973", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 206212, "upload_time": "2019-08-22T23:59:47", "url": "https://files.pythonhosted.org/packages/7f/06/6f996b5978b87f0ea6be925f220a5d21e8bcb7348d8a1486241cdc6cda91/vindauga-0.0.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "524b40f81b10249b5e93cf430c45baa2", "sha256": "aa7fd9594d0515806c7d65b2f9675c4f8cee633d07bb3a4232d04f14ac8ec454" }, "downloads": -1, "filename": "vindauga-0.0.6.tar.gz", "has_sig": false, "md5_digest": "524b40f81b10249b5e93cf430c45baa2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 147060, "upload_time": "2019-08-22T23:59:48", "url": "https://files.pythonhosted.org/packages/f7/b1/5d47d8099cfbfe6692c5f5030089af9214ea03ed6d67981691d1564948f0/vindauga-0.0.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "abd8740b3b8822f7f55b543d9eb31973", "sha256": "23e8e39f18ec83becbeb2d170e341761a0b97e0ccf99b970e0cc699c0cfb25b2" }, "downloads": -1, "filename": "vindauga-0.0.6-py3-none-any.whl", "has_sig": false, "md5_digest": "abd8740b3b8822f7f55b543d9eb31973", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 206212, "upload_time": "2019-08-22T23:59:47", "url": "https://files.pythonhosted.org/packages/7f/06/6f996b5978b87f0ea6be925f220a5d21e8bcb7348d8a1486241cdc6cda91/vindauga-0.0.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "524b40f81b10249b5e93cf430c45baa2", "sha256": "aa7fd9594d0515806c7d65b2f9675c4f8cee633d07bb3a4232d04f14ac8ec454" }, "downloads": -1, "filename": "vindauga-0.0.6.tar.gz", "has_sig": false, "md5_digest": "524b40f81b10249b5e93cf430c45baa2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 147060, "upload_time": "2019-08-22T23:59:48", "url": "https://files.pythonhosted.org/packages/f7/b1/5d47d8099cfbfe6692c5f5030089af9214ea03ed6d67981691d1564948f0/vindauga-0.0.6.tar.gz" } ] }