imdaveho / intermezzo

Cross platform, interactive forms and prompts for the command line

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

intermezzo

Cross platform library to build command line user experiences.

Table of Contents

Python is cross platform, so why shouldn't the tools that interact with the command line also be? Intermezzo provides a simple API to create terminal based user experiences. It takes the ergonomics of Python and combines it with the cross platform flexibility of Golang. Intermezzo is a thin wrapper around the simple, but powerful Termbox(-Go) library--which is a modern replacement for curses/blessings and pypiwin32

Curses/Blessings only works on Linux and BSD terminals. On Windows, there is little to no support/documentation is hard to grok. Additionally, there was nothing that kept the API consistent across both platforms. (Believe me, I've checked) Of course, there are specialized libraries out there like Colorama and Python Prompt Toolkit, but I felt they were overly complex and/or niche.

When I came across Peter Brittain's asciimatics, it was incredibly straight forward and intuitive. I wanted something similar to what he did with screen.py, but without all the other bells and whistles and fancy effects of the library. Then I came across termbox and, more recently, termbox-go. There is a proliferation of projects already built on top of termbox-go. The problem? Well...for most CLI applications, Go might be a bit overkill. How could we optimize for developer speed and productivity? (eg. with Python, Ruby, Node, etc) With Go 1.5+, go build allows for the building of shared C libraries that could be interfaced through FFI. This means that in theory, termbox-go could be ported to any language that has solid FFI with C.

Here is the Python version using CFFI. (feel free to use this as a reference)

TDB.

Copywrite (c) 2016-2017 David Ho. Licensed under the MIT license.

About

Cross platform, interactive forms and prompts for the command line

License:MIT License


Languages

Language:Python 64.5%Language:C 20.1%Language:Go 15.5%