Fixed command line to make use of signals
This commit is contained in:
parent
6fad4ceac1
commit
77cb4f6b27
|
@ -179,14 +179,9 @@ user = os.path.expanduser("~")
|
|||
#user = os.path.join(user,".ocarina2")
|
||||
set("USER", user)
|
||||
set("PLUGPATH", ["../core", "../extra"])
|
||||
#print get("PLUGPATH")
|
||||
#get("PLUGPATH")+=["../core"]
|
||||
#get("PLUGPATH")+=["../extra"]
|
||||
|
||||
# Find out what platform we are running on
|
||||
set("ARCH", sys.platform)
|
||||
|
||||
#if get("ARCH") == 'linux2':
|
||||
# readfile("/etc/ocarina.conf")
|
||||
|
||||
parseInput()
|
|
@ -10,6 +10,7 @@ __date__ ="$Dec 19, 2009 11:19:43 PM$"
|
|||
import curses
|
||||
import settings
|
||||
from bt.message import write
|
||||
import message
|
||||
from run import run
|
||||
|
||||
# (Sometimes) add a character to the input string
|
||||
|
@ -40,6 +41,6 @@ def backspace(input):
|
|||
|
||||
# Attempt to run a command
|
||||
def enter(input):
|
||||
#write(input)
|
||||
write(input)
|
||||
input = run(input)
|
||||
return input
|
|
@ -15,9 +15,8 @@ import bt.signal
|
|||
|
||||
def advance(y, maxy, stdscr):
|
||||
if y < (maxy-2):
|
||||
settings.replace("cliney", y+1)
|
||||
settings.set("cliney", y+1)
|
||||
return y+1
|
||||
|
||||
stdscr.move(0,0)
|
||||
stdscr.deleteln()
|
||||
stdscr.move(y,0)
|
||||
|
@ -28,7 +27,6 @@ def advance(y, maxy, stdscr):
|
|||
|
||||
# Add string to line y
|
||||
def insert(string):
|
||||
string = str(string)
|
||||
if len(string) == 0:
|
||||
return
|
||||
|
||||
|
@ -41,7 +39,6 @@ def insert(string):
|
|||
y = advance(y, maxyx[0], stdscr)
|
||||
insert(string[maxyx[1]:])
|
||||
return
|
||||
|
||||
stdscr.addstr(y, 0, string)
|
||||
advance(y, maxyx[0], stdscr)
|
||||
|
||||
|
|
Loading…
Reference in New Issue