git @ Cat's Eye Technologies Tamsin / master bin / wrap
master

Tree @master (Download .tar.gz)

wrap @masterraw · history · blame

#!/usr/bin/env python

import sys

WIDTH=120

for line in sys.stdin:
    line = line.rstrip('\n')
    while len(line) > WIDTH:
        print line[:WIDTH]
        line = line[WIDTH:]
    print line

# 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890