#! /usr/bin/python # To change this template, choose Tools | Templates # and open the template in the editor. __author__="bjschuma" __date__ ="$Dec 19, 2009 11:57:19 PM$" import curses import settings import bt.message # Add string to line y def insert(string): stdscr = settings.get("stdscr") max = settings.get("maxyx")[0] y = settings.get("cliney") stdscr.addstr(y, 0, string) if y < (max-1): settings.replace("cliney", y+1) else: stdscr.move(0,0) stdscr.deleteln() # Replace the string on the current line def disp(string): stdscr = settings.get("stdscr") try: stdscr.addstr(settings.get("cliney"), 0, string) except: bt.message.error("Error displaying string: "+string)