1: #line 702 "source_drivers.ipk"
2:
3:
4:
5:
6: import sys
7: from interscript.drivers.sources.base import source
8: from interscript.drivers.sources.base import eof
9: import string
10:
11: class stdin_source(source):
12: def __init__(self, encoding='utf8',**kwds):
13: apply(source.__init__,(self,encoding), kwds)
14: self.name = 'standard input'
15: self.closed = 0
16:
17: def _raw_readline(self):
18: if self.closed:
19: raise eof
20: line = sys.stdin.readline()
21: if len(line)==0: raise eof
22: self.lines_read = self.lines_read + 1
23: return string.rstrip(line)
24: