Skip to content

Instantly share code, notes, and snippets.

@pelavarre
Created August 19, 2023 21:58
Show Gist options
  • Save pelavarre/907b94cafe60728cfe4579f07d40688f to your computer and use it in GitHub Desktop.
Save pelavarre/907b94cafe60728cfe4579f07d40688f to your computer and use it in GitHub Desktop.
% python3 p.py
2023-08-19 14:53:03.789681
Darwin
/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/lib-dynload/termios.cpython-311-darwin.so
/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/tty.py
tty.setraw
Original vs 'tty.setraw' samples of 'termios.tcgetattr'
[26882, 3, 19200, 536872395, 9600, 9600, [b'\x04', b'\xff', b'\xff', b'\x7f', b'\x17', b'\x15', b'\x12', b'\xff', b'\x03', b'\x1c', b'\x1a', b'\x19', b'\x11', b'\x13', b'\x16', b'\x0f', b'\x01', b'\x00', b'\x14', b'\xff']]
[26624, 2, 19200, 536870979, 9600, 9600, [b'\x04', b'\xff', b'\xff', b'\x7f', b'\x17', b'\x15', b'\x12', b'\xff', b'\x03', b'\x1c', b'\x1a', b'\x19', b'\x11', b'\x13', b'\x16', b'\x0f', 1, 0, b'\x14', b'\xff']]
Differing Lists inside 'termios.tcgetattr'
[6]
[b'\x04', b'\xff', b'\xff', b'\x7f', b'\x17', b'\x15', b'\x12', b'\xff', b'\x03', b'\x1c', b'\x1a', b'\x19', b'\x11', b'\x13', b'\x16', b'\x0f', b'\x01', b'\x00', b'\x14', b'\xff']
[b'\x04', b'\xff', b'\xff', b'\x7f', b'\x17', b'\x15', b'\x12', b'\xff', b'\x03', b'\x1c', b'\x1a', b'\x19', b'\x11', b'\x13', b'\x16', b'\x0f', 1, 0, b'\x14', b'\xff']
Differing Items inside 'termios.tcgetattr'
[0] from=0x6902 to=0x6800
[1] from=0x3 to=0x2
[3] from=0x200005cb to=0x20000043
[6, 16] from=b'\x01' to=1
[6, 17] from=b'\x00' to=0
tty.setcbreak
Original vs 'tty.setcbreak' samples of 'termios.tcgetattr'
[26882, 3, 19200, 536872395, 9600, 9600, [b'\x04', b'\xff', b'\xff', b'\x7f', b'\x17', b'\x15', b'\x12', b'\xff', b'\x03', b'\x1c', b'\x1a', b'\x19', b'\x11', b'\x13', b'\x16', b'\x0f', b'\x01', b'\x00', b'\x14', b'\xff']]
[26882, 3, 19200, 536872131, 9600, 9600, [b'\x04', b'\xff', b'\xff', b'\x7f', b'\x17', b'\x15', b'\x12', b'\xff', b'\x03', b'\x1c', b'\x1a', b'\x19', b'\x11', b'\x13', b'\x16', b'\x0f', 1, 0, b'\x14', b'\xff']]
Differing Lists inside 'termios.tcgetattr'
[6]
[b'\x04', b'\xff', b'\xff', b'\x7f', b'\x17', b'\x15', b'\x12', b'\xff', b'\x03', b'\x1c', b'\x1a', b'\x19', b'\x11', b'\x13', b'\x16', b'\x0f', b'\x01', b'\x00', b'\x14', b'\xff']
[b'\x04', b'\xff', b'\xff', b'\x7f', b'\x17', b'\x15', b'\x12', b'\xff', b'\x03', b'\x1c', b'\x1a', b'\x19', b'\x11', b'\x13', b'\x16', b'\x0f', 1, 0, b'\x14', b'\xff']
Differing Items inside 'termios.tcgetattr'
[3] from=0x200005cb to=0x200004c3
[6, 16] from=b'\x01' to=1
[6, 17] from=b'\x00' to=0
%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment