41 lines
703 B
Python
41 lines
703 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$"
|
|
|
|
import curses
|
|
|
|
from bt.message import write
|
|
import manager
|
|
import settings
|
|
|
|
|
|
global halt
|
|
halt = False
|
|
|
|
def loop():
|
|
write("Beginning command line loop",True)
|
|
global halt
|
|
|
|
stdscr = settings.get("stdscr")
|
|
input = ""
|
|
|
|
while halt == False:
|
|
c = stdscr.getch()
|
|
|
|
if(c >= 32 and c<= 126):
|
|
input += curses.keyname(c)
|
|
#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 |