Read the next character from an input port.
(inport)
| 51 | return token |
| 52 | |
| 53 | def readchar(inport): |
| 54 | "Read the next character from an input port." |
| 55 | if inport.line != '': |
| 56 | ch, inport.line = inport.line[0], inport.line[1:] |
| 57 | return ch |
| 58 | else: |
| 59 | return inport.file.read(1) or eof_object |
| 60 | |
| 61 | def read(inport): |
| 62 | "Read a Scheme expression from an input port." |