You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

2.0 KiB

Python Refactoring

UTF-8

Unicode chartable

https://www.utf8-chartable.de/unicode-utf8-table.pl

Fullsize/Halfsize forms

https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms
https://en.wikipedia.org/wiki/Halfwidth_and_Fullwidth_Forms_(Unicode_block)

Terminal

https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda

Blinking Text

echo  -e "\033[5mBlinking Text\033[0m"
echo  -e "\033[33;5mBlinking Text\033[0m"
echo  -e "\033[33;7mBlinking Text\033[0m"
echo  -e "\033[33;5;7mBlinking Text\033[0m"

Sphinx Doc

Domains - docstring syntax

https://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html#directive-py-class

ReStructuredText

https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#explicit-markup-blocks

Disable SIGSTOP triggered by CTRL+S

import sys, termios

attr = termios.tcgetattr(sys.stdin)
# Save the value to be restored
bak = attr[6][termios.VSTOP]

# Disable SIGSTOP triggered by CTRL+S
attr[6][termios.VSTOP]=0
termios.tcsetattr(sys.stdin, termios.TCSADRAIN, attr)

'''. . . do stuff . . .'''

# reEnable SIGSTOP triggered by CTRL+S
attr[6][termios.VSTOP]=bak
termios.tcsetattr(sys.stdin, termios.TCSADRAIN, attr)

Terminal Mapping:

  • CTRL-C -> termios.VINTR
  • CTRL-S -> termios.VSTOP
  • CTRL-Z -> termios.VSUSP