File: strip.py

package info (click to toggle)
python-blessed 1.25-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,812 kB
  • sloc: python: 14,645; makefile: 13; sh: 7
file content (18 lines) | stat: -rwxr-xr-x 313 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env python3
"""Example script that strips input of terminal sequences."""
# std imports
import sys

# local
import blessed


def main():
    """Program entry point."""
    term = blessed.Terminal()
    for line in sys.stdin:
        print(term.strip_seqs(line))


if __name__ == '__main__':
    main()