File: wrappager.py

package info (click to toggle)
mycli 1.42.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,036 kB
  • sloc: python: 8,587; makefile: 10
file content (17 lines) | stat: -rwxr-xr-x 286 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env python

import sys


def wrappager(boundary: str) -> None:
    print(boundary)
    while 1:
        buf = sys.stdin.read(2048)
        if not buf:
            break
        sys.stdout.write(buf)
    print(boundary)


if __name__ == "__main__":
    wrappager(sys.argv[1])