mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-26 18:22:09 +02:00
Import pyte
This commit is contained in:
33
pyte/__main__.py
Normal file
33
pyte/__main__.py
Normal file
@@ -0,0 +1,33 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
pyte
|
||||
~~~~
|
||||
|
||||
Command-line tool for "disassembling" escape and CSI sequences::
|
||||
|
||||
$ echo -e "\e[Jfoo" | python -m pyte
|
||||
ERASE_IN_DISPLAY 0
|
||||
DRAW f
|
||||
DRAW o
|
||||
DRAW o
|
||||
LINEFEED
|
||||
|
||||
$ python -m pyte foo
|
||||
DRAW f
|
||||
DRAW o
|
||||
DRAW o
|
||||
|
||||
:copyright: (c) 2011-2012 by Selectel.
|
||||
:copyright: (c) 2012-2016 by pyte authors and contributors,
|
||||
see AUTHORS for details.
|
||||
:license: LGPL, see LICENSE for more details.
|
||||
"""
|
||||
|
||||
if __name__ == "__main__":
|
||||
import sys
|
||||
import pyte
|
||||
|
||||
if len(sys.argv) == 1:
|
||||
pyte.dis(sys.stdin.read())
|
||||
else:
|
||||
pyte.dis("".join(sys.argv[1:]))
|
||||
Reference in New Issue
Block a user