summaryrefslogtreecommitdiffstats
path: root/examples/strip_example.py
blob: d88b893399d6d4f1e15e6c3d65d8157f4c858957 (plain)
1
2
3
4
5
6
7
8
9
import sys
do_print = False
for line in sys.stdin:
    if line.startswith("%--- Begin generated contents ---"):
       do_print = True
    elif line.startswith("%--- End generated contents ---"):
       do_print = False
    elif do_print:
       sys.stdout.write(line)