INNER CODE UNIT · Python

default

probcomp/bayeslite · shell/src/core.py:108

    def default(self, line):
        # XXX What is this idiocy?  End-of-input is reported the same
        # as the line with characters `E', `O', `F'.
        if line == 'EOF':
            self.stdout.write('\nMoriturus te querio.\n')
            return True
        if self.prompt == self.def_prompt:
            if line.startswith('.'):
                cmd = line
                for i, c in enumerate(line):
                    if c in (' ', '\t'):
                        cmd = line[:i]
                        break
                self.stdout.write('Unknown command: %s\n' % (cmd,))
                return False
        # Add a line and check whether it finishes a BQL phrase.
        self.bql.write(line)
        self.bql.write('\n')

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…