print tor startup progress to term

This commit is contained in:
Kevin Froman 2020-02-08 04:24:19 -06:00
parent 572e29f5d5
commit 982ac88a72
4 changed files with 19 additions and 4 deletions

View file

@ -0,0 +1 @@
from .boxprint import bordered as box_print

8
src/utils/boxprint.py Normal file
View 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)