Skip to main content

portable text interface framework

Project description

dirtywords - portable text interface framework

So I wanted to create a text interface and ended up creating a framework. “Why didn’t you just stick with curses?” I hear you ask. For two good reasons: First, curses is not very portable. It does not run on windows. And it can not be installed with pip. The second reason of course is that I had fun with this project.

So what is this if not curses? You can think of it as a wrapper around curses with a different (though similar) API. But the interesting thing about it is that it implements a tiny set of functions with curses and builds the rest from there. And this tiny core can easily be implemented with other frameworks.

There are currently three implementations of the core: One based on curses, another one based on pygame, and a minimal implementation without any dependencies outside of the standard library.


import sys
from dirtywords import Screen, AttrString

text = AttrString(u'Hello World!', fg_color=(0, 255, 0))
screen = Screen(3, len(text) + 4)
screen.putstr(1, 2, text)

while True:
    ch = screen.getch()
    if ch == ord('q'):

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for dirtywords, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size dirtywords-0.0.2.tar.gz (7.7 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page