[Twisted-Python] Curses

Moshe Zadka m at moshez.org
Sat Sep 29 12:29:46 EDT 2001


As the last living dinosaur, I've written a curses module:
it's at http://moshez.org/tcurses.py

Here is an example usage program:

>---------------------------------------------<
from twisted.internet import main
from twisted.python import delay, log
import tcurses
import curses

log.startLogging(open("twistd.log", "ab+"))

screen = tcurses.Screen()
protocol = tcurses.WindowProtocol()
window = tcurses.LineInput(15, 0, 79)
protocol.addWindow(window)
screen.setProtocol(protocol)

app = main.Application("curses-demo")
app.addPort(screen)
app.run()
>------------------------------------------------<

I know it's not exactly a "port", but it's sure close enough in the
Twisted scheme of things (IOW, it's got startListening ;-)
(and yes, I know LineInput could use a *lot* of work. But it's pretty
cool regardless)
-- 
The Official Moshe Zadka FAQ: http://moshez.geek
The Official Moshe Zadka FAQ For Dummies: http://moshez.org
Read the FAQ





More information about the Twisted-Python mailing list