BVB Source Codes

voltron Show colour.py Source code

Return Download voltron: download colour.py Source code - Download voltron Source code - Type:.py
  1. ESCAPES = {
  2.     # reset
  3.     'reset':        0,
  4.  
  5.     # colours
  6.     'grey':         30,
  7.     'red':          31,
  8.     'green':        32,
  9.     'yellow':       33,
  10.     'blue':         34,
  11.     'magenta':      35,
  12.     'cyan':         36,
  13.     'white':        37,
  14.  
  15.     # background
  16.     'b_grey':       40,
  17.     'b_red':        41,
  18.     'b_green':      42,
  19.     'b_yellow':     43,
  20.     'b_blue':       44,
  21.     'b_magenta':    45,
  22.     'b_cyan':       46,
  23.     'b_white':      47,
  24.  
  25.     # attributes
  26.     'a_bold':       1,
  27.     'a_dark':       2,
  28.     'a_underline':  4,
  29.     'a_blink':      5,
  30.     'a_reverse':    7,
  31.     'a_concealed':  8
  32. }
  33. ESC_TEMPLATE = '\033[{}m'
  34.  
  35. def escapes():
  36.     return ESCAPES
  37.  
  38. def get_esc(name):
  39.     return ESCAPES[name]
  40.  
  41. def fmt_esc(name):
  42.     return ESC_TEMPLATE.format(escapes()[name])
  43.  
  44. FMT_ESCAPES = dict((k, fmt_esc(k)) for k in ESCAPES)
  45.  
downloadcolour.py Source code - Download voltron Source code
Related Source Codes/Software:
IGListKit - A data-driven UICollectionView framework for build... 2017-01-11
androidmvp - MVP Android Example 2017-01-11
svelte - The magical disappearing UI framework ... 2017-01-11
kcptun - A Simple UDP Tunnel Based On KCP 2017-01-11
poisontap - Exploits locked/password protected computers over ... 2017-01-10
ecma262 - Status, process, and documents for ECMA262 ... 2017-01-11
react-native-elements - React Native Elements UI Toolkit 2017-01-11
tensorflow-zh - Google new open source ai system TensorFlow Chines... 2017-01-11
forum - Blue light (the Lantern) the official BBS 2017-01-11
socketcluster - Highly scalable realtime framework ... 2017-01-11
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top