'return the next character from stdin. Watch out for lookahead. If
the character is a control character, translate it to a space or
linefeed.'

def _get(self):

    c = self.theLookahead
    self.theLookahead = None
    if (c == None):
        c = self.instream.read(1)
    if ((c >= '    ') or (c == '\n')):
        return c
    if (c == ''):
        return '\x00'
    if (c == '\r'):
        return '\n'
    return '    '
