Metadata-Version: 2.4
Name: py-vision-free
Version: 1.0.0
Summary: A text-mode UI toolkit in the style of Turbo Vision, standard library only
Author-email: Peter Kokosharov <peter.kokosharov@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/peterkokosharov/py-vision-free
Project-URL: Source, https://github.com/peterkokosharov/py-vision-free
Project-URL: Changelog, https://github.com/peterkokosharov/py-vision-free/blob/main/CHANGELOG.md
Keywords: tui,terminal,console,text-ui,widgets,turbo-vision
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: User Interfaces
Classifier: Topic :: Terminals
Classifier: Typing :: Typed
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE.md
Provides-Extra: dev
Requires-Dist: ruff==0.17.6; extra == "dev"
Requires-Dist: mypy==2.4.1; extra == "dev"
Dynamic: license-file

# py-vision-free

A text-mode UI toolkit for Python: windows, dialogs, menus, a status line and input
widgets in the terminal. Standard library only, Python 3.12 or newer, on Windows,
Linux and macOS.

Inspired by Borland Turbo Vision; used by rex for its terminal UI.

## Install

    pip install py-vision-free

The import name is `py_vision_free`.

## A first program

```python
from py_vision_free import Application, Command, Rect
from py_vision_free.platform import open_terminal
from py_vision_free.widgets import StaticText, StatusItem, StatusLine
from py_vision_free.window import Window


class Hello(Application):
    def setup(self) -> None:
        w, h = self.screen.width, self.screen.height
        self.set_status_line(StatusLine(Rect(0, h - 1, w, h), [
            StatusItem("~Alt-X~ Exit", "Alt+X", Command.QUIT),
        ]))
        win = Window(Rect(10, 3, 50, 10), "Hello")
        win.insert(StaticText(Rect(2, 1, 36, 4), "Hello, terminal!", role="window"))
        self.desktop.insert(win)


Hello(open_terminal()).run()
```

Alt-X quits. The `examples/` folder has `hello.py`, `mmenu.py`, `palette.py` and
`tvdemo/`, small programs in the shape of the demos that come with Turbo Vision.

## Links

- [User guide](https://github.com/peterkokosharov/py-vision-free/blob/main/docs/USER-GUIDE.md)
  and [API reference](https://github.com/peterkokosharov/py-vision-free/blob/main/docs/api/README.md)
- [NOTICE](https://github.com/peterkokosharov/py-vision-free/blob/main/NOTICE.md)
- [License](https://github.com/peterkokosharov/py-vision-free/blob/main/LICENSE) (MIT)
- Upstream C++ Turbo Vision: [magiblot/tvision](https://github.com/magiblot/tvision)
