about summary refs log tree commit diff
path: root/example_escs.py
diff options
context:
space:
mode:
authorsterni <sternenseemann@systemli.org>2021-07-06 23:10:36 +0200
committerSören Tempel <soeren+git@soeren-tempel.net>2021-07-15 13:28:33 +0200
commit7bbcd16197e2c1851bb506db7911cd2ab20173bb (patch)
treefa18ca1d4029a156761d3d6b5548da6edc2da0bc /example_escs.py
parent5ae3c1e07c3722149ec06b779474b97163692f32 (diff)
Move parsing of CSI escape sequences into dedicated functions
This breaks up the deeply indented blocks which implemented this in
pty.Parser.parse() before. It also allows us to simplify the control
flow a bit: The two nested try … except blocks for StopIteration (to
detect if we need to postpone parsing) and AssertionError (to detect
if we don't understand what looked like an escape sequence or handle
other parse errors) into a single one.
Diffstat (limited to 'example_escs.py')
0 files changed, 0 insertions, 0 deletions