retroforth/tools/retro-unu.py
crc 9c69997d23 reformat python code for consistency
FossilOrigin-Name: 736acb6c40df186d519b832766543bb2a14ae09bb7aed1064922a211b3fff322
2020-09-22 12:06:40 +00:00

13 lines
320 B
Python
Executable file

#!/usr/bin/env python3
import sys
if __name__ == "__main__":
f = sys.argv[1]
in_block = False
with open(f, "r") as source:
for line in source.readlines():
if line.rstrip() == "~~~":
in_block = not in_block
elif in_block:
print(line.rstrip())