- commit
- c4f56a66b32e2b5100acc9783c4a9b5c1a4ee5c7
- parent
- e4c90edd275833b1c1a0b9c7f5138e1785077fae
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2020-07-11 15:11
remove styling completely colorama can be used instead
Diffstat
| M | boon.py | 27 | +-------------------------- |
1 files changed, 1 insertions, 26 deletions
diff --git a/boon.py b/boon.py
@@ -100,31 +100,6 @@ def getch(): 100 100 # return OSC + '2;' + title + BEL 101 101 102 102103 -1 def style(104 -1 s,105 -1 bold=False,106 -1 rev=False,107 -1 underline=False,108 -1 italic=False,109 -1 fg=None,110 -1 bg=None,111 -1 ):112 -1 styles = ''113 -1 if bold:114 -1 styles += get_cap('bold')115 -1 if rev:116 -1 styles += get_cap('rev')117 -1 if underline:118 -1 styles += get_cap('smul')119 -1 if italic:120 -1 styles += get_cap('sitm')121 -1 if fg is not None:122 -1 styles += get_cap('setaf', fg)123 -1 if bg is not None:124 -1 styles += get_cap('setab', bg)125 -1 return styles + s + get_cap('sgr0')126 -1127 -1128 103 class App: 129 104 def __init__(self): 130 105 self.old_lines = [] @@ -181,7 +156,7 @@ class Example(App): 181 156 182 157 def render(self): 183 158 for key in self.keys:184 -1 yield style(str(key), fg=13) + 'test'-1 159 yield str(key) + 'test' 185 160 186 161 187 162 if __name__ == '__main__':