Beispiel #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()
Beispiel #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)
Beispiel #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 = ""
Beispiel #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)
Beispiel #5
0
 def __init__(self, allowPrint):
     self.allowPrint = allowPrint
     self.mm = ModuleManager
     self.ch = command_handler.Commandhandler(self.mm, True)