(self)
Generate an AUTO line number and wait for input.
Generate an AUTO line number and wait for input.
Generate an AUTO line number and wait for input .
def _auto_step(self):
        """Generate an AUTO line number and wait for input."""
        try:
            numstr = b'%d' % (self._auto_linenum,)
            if self._auto_linenum in self.program.line_numbers:
                prompt = numstr + b'*'
            else:
                prompt = numstr + b' '
            line = self.console.read_line(prompt, from_start=True)
            # remove *, if present
            if line[:len(numstr)+1] == b'%s*' % (numstr,):
                line = b'%s %s' % (numstr, line[len(numstr)+1:])
            # run or store it; don't clear lines or raise undefined line number
            self.interpreter.direct_line = self.tokeniser.tokenise_line(line)
            c = self.interpreter.direct_line.peek()
            if c == b'\0':
                # check for lines starting with numbers (6553 6) and empty lines
                empty, scanline = self.program.check_number_start(self.interpreter.direct_line)
                if not empty:
                    self.program.store_line(self.interpreter.direct_line)
                    # clear all program stacks
                    self.interpreter.clear_stacks_and_pointers()
                    self._clear_all()
                self._auto_linenum = scanline + self._auto_increment
            elif c != b'':
                # it is a command, go and execute
                self.interpreter.set_parse_mode(True)
        except error.Break:
            # ctrl+break, ctrl-c both stop background sound
            self.sound.stop_all_sound()
            self._auto_mode = False
def _auto_step ( self ) : try : numstr = b'%d' % ( self . _auto_linenum , ) if self . _auto_linenum in self . program . line_numbers : prompt = numstr + b'*' else : prompt = numstr + b' ' line = self . console . read_line ( prompt , from_start = True ) # remove *, if present if line [ : len ( numstr ) + 1 ] == b'%s*' % ( numstr , ) : line = b'%s %s' % ( numstr , line [ len ( numstr ) + 1 : ] ) # run or store it; don't clear lines or raise undefined line number self . interpreter . direct_line = self . tokeniser . tokenise_line ( line ) c = self . interpreter . direct_line . peek ( ) if c == b'\0' : # check for lines starting with numbers (6553 6) and empty lines empty , scanline = self . program . check_number_start ( self . interpreter . direct_line ) if not empty : self . program . store_line ( self . interpreter . direct_line ) # clear all program stacks self . interpreter . clear_stacks_and_pointers ( ) self . _clear_all ( ) self . _auto_linenum = scanline + self . _auto_increment elif c != b'' : # it is a command, go and execute self . interpreter . set_parse_mode ( True ) except error . Break : # ctrl+break, ctrl-c both stop background sound self . sound . stop_all_sound ( ) self . _auto_mode = False