ocarina/src/core/cline/loop.py

40 lines
682 B
Python

#! /usr/bin/python
# To change this template, choose Tools | Templates
# and open the template in the editor.
__author__="bjschuma"
__date__ ="$Dec 19, 2009 9:39:37 PM$"
from bt.message import write
import manager
import settings
# Command line related imports
from addch import addch
from message import *
global halt
halt = False
# Loop around until the plugin manager calls shutdown
def loop():
write("Beginning command line loop",True)
global halt
stdscr = settings.get("stdscr")
input = settings.get("prompt")
(y, x) = settings.get("stdscr").getyx()
disp(input)
while halt == False:
input = addch(input)
disp(input)
def quit():
global halt
halt = True