Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/voilalex/cursy
https://github.com/voilalex/cursy
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/voilalex/cursy
- Owner: VoIlAlex
- License: mit
- Created: 2020-04-03T20:26:58.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-04-14T17:58:52.000Z (over 4 years ago)
- Last Synced: 2023-12-29T14:50:15.007Z (about 1 year ago)
- Language: Python
- Size: 2.93 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Cursy
Little and simple wrapper for curses application.
## Getting started
The `@curses_application` decorator is a util built upon `curses.wrapper` function.
This decorator adds `stdscr` to `self` object on execution time of `start` method
of the class under `@curses_application` decorator, so it can be used within the
method to access the initialized curses screen.## Installation
```bash
pip install cursy
```## Usage
```python
@cursy.curses_application
class Application:
def start(self):
self.stdscr.clear()
self.stdscr.addstr(0, 0, 'Hello world')
self.stdscr.getch()if __name__ == "__main__":
app = Application()
app.start()
```## License
[MIT](LICENSE.md)