ocarina/src/core/cline/loop.py

40 lines
675 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
# Command line related imports
from addch import addch
global halt
halt = False
def loop():
write("Beginning command line loop",True)
global halt
#stdscr = settings.get("stdscr")
input = ""
while halt == False:
input = addch(input)
#input=input[:x-4]+curses.keyname(c)+input[x-4:]
#self.changeLine(y)
#self.stdscr.move(y,x+1)
if input == "exit":
manager.manager.shutdown()
halt = True
def quit():
global halt
halt = True