ocarina/src/core/cli.py

34 lines
593 B
Python

#! /usr/bin/python
# To change this template, choose Tools | Templates
# and open the template in the editor.
__author__="bjschuma"
__date__ ="$Mar 13, 2010 9:08:56 PM$"
import readline
import rlcompleter
import ocarina
readline.parse_and_bind("tab:complete")
from ct.call import *
from ct.message import *
def loop():
while True:
try:
enable()
exec raw_input(ocarina.vars["$prompt"] + " ")
restore()
# Catch this so that we can use ctrl-d to exit
except EOFError:
print ""
exit()
except Exception,e:
print e
#ocarina.events.invite("ocarina-start",loop)