print tor startup progress to term
This commit is contained in:
parent
572e29f5d5
commit
982ac88a72
4 changed files with 19 additions and 4 deletions
|
@ -0,0 +1 @@
|
|||
from .boxprint import bordered as box_print
|
8
src/utils/boxprint.py
Normal file
8
src/utils/boxprint.py
Normal file
|
@ -0,0 +1,8 @@
|
|||
def bordered(text):
|
||||
lines = text.splitlines()
|
||||
width = max(len(s) for s in lines)
|
||||
res = ['┌' + '─' * width + '┐']
|
||||
for s in lines:
|
||||
res.append('│' + (s + ' ' * width)[:width] + '│')
|
||||
res.append('└' + '─' * width + '┘')
|
||||
return '\n'.join(res)
|
Loading…
Add table
Add a link
Reference in a new issue