-
-
Save j4james/8670244e51acbb10e7f1acf7f656264c to your computer and use it in GitHub Desktop.
Component symbols from the DEC Technical character set
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chars = ''' 1##5 | |
V ? ( ) [ ] { } + - 3 | |
& & 7 | |
"## $ + - ' ) + - / 0 4 | |
! % , . ( * / 0 & & 2##6 | |
, . , . 1#5 | |
"## $ + - ' ) 1#5 3 | |
& & & & & & 15 7 4 | |
! % , . ( * S 26 2#6 2#6 | |
''' | |
def write(s): | |
import sys | |
sys.stdout.write(s) | |
def pattern(x,y,checker): | |
def character(c): | |
if c in '+': write('\033(>') | |
write(c) | |
if c in '?': write('\033(B') | |
for line in chars.split('\n'): | |
while len(line) < 36: line += ' ' | |
write('\033[%d;%dH' % (y,x)) | |
if checker: | |
for i,c in enumerate(line): | |
on = (y+i)%2 | |
write('\033[0;7m' if on else '\033[0;1;7m') | |
character(c) | |
else: | |
for c in line: | |
character(c) | |
y += 1 | |
write('\033[1;7;0,|\033[m\033[2J') | |
write('\033P2$p0;2;0;0;0/7;2;64;64;64/15;2;79;79;79\033\\') | |
write('\033[1;28HDEC TCS Component Symbols') | |
write('\033(>') | |
pattern(23,3,False) | |
pattern(23,13,True) | |
write('\033[m\033(B\033[24H') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment