git @ Cat's Eye Technologies Dipple / master python / show-textpos-in-context.py
master

Tree @master (Download .tar.gz)

show-textpos-in-context.py @masterraw · history · blame

# SPDX-FileCopyrightText: Chris Pressey, the original author of this work, has dedicated it to the public domain.
# For more information, please refer to <https://unlicense.org/>
# SPDX-License-Identifier: Unlicense

import sys

LINE = 1
COL = 182564

lines = []
for line in sys.stdin:
    lines.append(line)
l = lines[LINE]
AT = COL
SIZE = 160

for p in range(-6,6):
    if p == 0:
        print 'vvvvvv'
    print l[AT+(SIZE*p):AT+(SIZE*(p+1))]