trachet
What is This?
trachet = tracer + ratchet(step-by-step debugging service)
This Program runs as a terminal filter process, between Terminals and Applications. It provides step-by-step debugging and formatted sequence tracing service. You can look terminal I/O sequence on realtime, and it enables you to do step-by-step execution.
Install
via github
$ git clone --recursive https://github.com/saitoha/trachet.git $ cd trachet $ python setup.py install
or via pip
$ pip install trachet
Usage
$ trachet [options] command
Options:
-h, --help show this help message and exit -o OUTPUT, --output=OUTPUT specify output device or file -b, --break "break" the program at the startup time -m, --monochrome don't use color in output terminal" --version show version
Sequense Tracing
If you specified TTY device by -o option, you can look I/O sequence tracing on realtime.
Step by Step debugging
<F6> Toggle trace state ON/OFF.
<F7> Toggle break state ON/OFF.
<F8> Step to next char or control sequence.
<F9> Step to next ESC or CSI sequence.
QuickStart
STEP1
First, You need to prepare two terminal windows, debugged terminal and output terminal.
STEP2
At the output terminal, type “tty” command.
$ tty /dev/ttys002
Now you get output terminal’s TTY device name(=/dev/ttys002).
STEP3
At the debugged terminal, launch trachet.
Run default shell and send formatted I/O sequences to output terminal
$ trachet -o/dev/ttys002
Run default shell and write non-colored formatted I/O sequences to a text file.
$ trachet -o log.txt
Run vim and send formatted I/O sequences to output terminal.
$ trachet -o/dev/ttys002 vim
Run emacs and send formatted I/O sequences to output terminal, and “break” emacs on startup time
$ trachet -b -o/dev/ttys002 emacs -nw
Replay output log created by script(1) step by step.
$ trachet -b -o/dev/ttys002 cat ~/typescript -
How It Works
PTY and Normal Terminal/Application:
+---------------------------------------------+ | Terminal | +---------+-----------------------------------+ | +---------|-----------------------------------+ | +------+-------+ +---------------+ | | | Master |========| Slave | | | +--------------+ +-------+-------+ | +----------------------------------|----------+ | +----------------------------------+----------+ | Application | +---------------------------------------------+TFF (Terminal Filter Framework):
Scanner Event Driven Parser Event Dispatcher +-----+ +-----+ +-----+ << I/O Stream >> | | << CodePoint Stream >> | | << Event Stream >> | | << I/O Stream >> ------------------->| |------------------------>| |-------------------->| |---||--------------------> (Raw Sequences) | | (Unicode Points) | | (Function Call) | | (Raw Sequences) +-----+ +-----+ +--+--+ ISO-2022 ISO-6429 | Compatible Parsing | v +-----+ Event Observer | | << I/O Stream >> (I/O Handler) | |---||--------------------> | | (Raw Sequences) +-----+With Trachet…
+----------------------------------------------------------+ +------------------------+ | | | | | Terminal | | Other Device or File | | | | | +----------------------------------------------------------+ +------------------------+ | ^ ^ | | | < input > < output > | | | | | +----------------+ | | | [ PTY 1 ] | +------|------|-------------------------------+ | | v | | | | +----------+---+ +----------------+ | | | | Master |=======| Slave | | | | +--------------+ +--+-------------+ | | | | ^ | | +----------------------------|--------|-------+ | | | | < input > | | | | < trace > +---------------+ < output > | | | | [ Trachet Process ] | | | +--------------------------|------------------------|---------------+ | | | | | | | +-----------|-------<< TFF >>--------|------------+ | | | | v | | | | | < control > | +-----------------+ +---------+---------+ | | | | +----->| | InputHandler | | OutputHandler | | | | | | | +--+-----+----+---+ +--+----------------+ | | | | | | | | | | ^ | | | | | +-----|-----|----|------------|------|------------+ | | | | | | | | | | | | | | | | | | | | | | v | v v | | | | +----+---------------+ | +----------------+ | | | | | ActionController | | | Tracer |----------------------------+ | +--------------------+ | +----------------+ | | | | | | +--------------------------|------------------------|---------------+ | | < input > < output > | | | +----------------+ | | | | [ PTY 2 ] +-------|-------|-----------------------------+ | v | | | +------------+--+ +---------------+ | | | Master |=======| Slave | | | +---------------+ +----+----------+ | | | ^ | +-------------------------------|------|------+ | | +--------------------+ | | | < input > < output > | | v | +---------------------------------------------------------+-----------------------------+ | | | Target Application | | | +---------------------------------------------------------------------------------------+
Dependency
TFF - Terminal Filter Framework https://github.com/saitoha/tff
Reference
vt100.net http://vt100.net/
Private Control Functions used by DEC http://vt100.net/emu/ctrlfunc_dec.html
Xterm Control Sequences http://invisible-island.net/xterm/ctlseqs/ctlseqs.html
TeraTerm / Supported Control Functions http://ttssh2.sourceforge.jp/manual/en/about/ctrlseq.html
MinTTY / Mintty-specific control sequences http://code.google.com/p/mintty/wiki/CtrlSeqs
RLogin / Supported control codes http://nanno.dip.jp/softlib/man/rlogin/ctrlcode.html
License
GNU GENERAL PUBLIC LICENSE Version 3
Metadata
Release files for trachet 1.0.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| trachet-1.0.9.tar.gz | 69.1 kB | Without provenance | Details for trachet-1.0.9.tar.gz |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| trachet-1.0.9-py2.7.egg | Legacy Egg format | - | - | Details for trachet-1.0.9-py2.7.egg |
| trachet-1.0.9-py2.6.egg | Legacy Egg format | - | - | Details for trachet-1.0.9-py2.6.egg |
Total release size: 357.8 kB
Release files / trachet-1.0.9.tar.gz
| Download URL | trachet-1.0.9.tar.gz |
|---|---|
| Size | 69.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a4abba69428e9ed793cb01b8d46a9019af4a0e5f81a63e593936bb3846d9dade
|
|
BLAKE2b-256 checksum How to use checksums |
3d9ef5ccb1bb6a6203adb1b0b109b77d3cebb7267f1fff4c730ceb89ed089be4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / trachet-1.0.9-py2.7.egg
| Download URL | trachet-1.0.9-py2.7.egg |
|---|---|
| Size | 144.4 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
272681ac9f13c26554549fbfc5246b90effbddfd8857954d51fb3be88bdf3f99
|
|
BLAKE2b-256 checksum How to use checksums |
238bd2644828f7da96f338fdbe78ca0645c576f87a48116837f043d7aebf2e50
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / trachet-1.0.9-py2.6.egg
| Download URL | trachet-1.0.9-py2.6.egg |
|---|---|
| Size | 144.4 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
18593ef3a25b555070ed30e31ace2f22f7c818b8f3eed0e51e454af6d77b9a64
|
|
BLAKE2b-256 checksum How to use checksums |
64f67cae364b17f92408999fb65763910638dd10915347506117b3b8e6ea97e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for trachet 1.0.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.