Exemplo n.º 1
0
    def input(self, msg, is_str=False):
        # TODO: implement this in VT terms
        while True:
            try:
                self.vt.push()
                self.vt.move(9, 1)

                if msg:
                    print msg,

                self.vt.e('[?25h')
                line = raw_input()
                self.vt.e('[?25l')

                self.vt.flush()
                self.vt.pop()
                if not is_str:
                    val = Parser.parse_line(self.vm, line)
                else:
                    val = line

                return val
            except ParseError:
                print 'ERR:DATA'
                print
Exemplo n.º 2
0
    def input(self, msg, is_str=False):
        # TODO: implement this in VT terms
        while True:
            try:
                self.vt.push()
                self.vt.move(9, 1)

                if msg:
                    print msg,

                self.vt.e('[?25h')
                line = raw_input()
                self.vt.e('[?25l')

                self.vt.flush()
                self.vt.pop()
                if not is_str:
                    val = Parser.parse_line(self.vm, line)
                else:
                    val = line

                return val
            except ParseError:
                print 'ERR:DATA'
                print
Exemplo n.º 3
0
    def input(self, msg, is_str=False):
        while True:
            try:
                if msg:
                    print msg,

                line = raw_input()
                if not is_str:
                    val = Parser.parse_line(self.vm, line)
                else:
                    val = line

                return val
            except ParseError:
                print 'ERR:DATA'
                print
Exemplo n.º 4
0
    def input(self, msg, is_str=False):
        while True:
            try:
                if msg:
                    print msg,

                line = raw_input()
                if not is_str:
                    val = Parser.parse_line(self.vm, line)
                else:
                    val = line

                return val
            except ParseError:
                print 'ERR:DATA'
                print