Ejemplo n.º 1
0
def run():
    global shellface
    global mm

    ch = command_handler.Commandhandler(mm, False)

    while True:
        try:
            setFace()
            command = input(shellface + " ")

            ch.handle(command)
        except KeyboardInterrupt:
            sys.exit()
Ejemplo n.º 2
0
def run(scf):
    global mm

    scriptline = 0
    ch = command_handler.Commandhandler(mm, False)

    while True:
        try:
            if scriptline == len(scf):
                sys.exit(0)

            command = scf[scriptline][0]
            scriptline += 1

            ch.handle(command)
        except KeyboardInterrupt:
            print()
            sys.exit(0)
Ejemplo n.º 3
0
def run():
    global shellface
    global mm

    ch = command_handler.Commandhandler(mm, False)

    while True:
        try:
            setFace()
            command = input(shellface + " ")

            ch.handle(command)
        except KeyboardInterrupt:
            if mm.moduleLoaded == 0:
                print()
                sys.exit(0)
            else:
                print()
                mm.moduleLoaded = 0
                mm.moduleName = ""
Ejemplo n.º 4
0
def run():
    global shellface
    global mm

    ch = command_handler.Commandhandler(mm, False)

    while True:
        try:
            setFace()
            command = input(shellface + " ")

            ch.handle(command)
        except KeyboardInterrupt:
            if mm.moduleLoaded == 0:
                print()
                sys.exit(0)
            else:
                print()
                mm.moduleLoaded = 0
                mm.moduleName = ""
                print(colors.bold + colors.red +
                      "Ctrl + C detected, going back..." + colors.end)
Ejemplo n.º 5
0
 def __init__(self, allowPrint):
     self.allowPrint = allowPrint
     self.mm = ModuleManager
     self.ch = command_handler.Commandhandler(self.mm, True)