summaryrefslogtreecommitdiff
path: root/plac/doc/read_stdin.py
blob: 584644fe0581808c44d329767bf6231bcab2e14e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
"""
You can run this script as 
$ python read_stdin.py < ishelve.bat 
"""
from __future__ import with_statement
import sys
from ishelve import ishelve
import plac

if __name__ == '__main__':
    with plac.Interpreter(ishelve) as i:
        for line in sys.stdin:
            print(i.send(line))