Fix disabling line wrapping.
This commit is contained in:
parent
e28ab0863c
commit
8664725c7b
@ -14,14 +14,14 @@ class ProgressBar:
|
|||||||
print('\r' # Go to the start of the line
|
print('\r' # Go to the start of the line
|
||||||
'\x1b[K' # Clear line
|
'\x1b[K' # Clear line
|
||||||
'\x1b[0m' # Restart the "style"
|
'\x1b[0m' # Restart the "style"
|
||||||
'\x1b[7l' # Disable line wrapping
|
'\x1b[?7l' # Disable line wrapping
|
||||||
'|' # Put the first "|"
|
'|' # Put the first "|"
|
||||||
+ blocks_done * '█' # Completed blocks
|
+ blocks_done * '█' # Completed blocks
|
||||||
+ blocks_to_go * ' ' # Uncompleted blocks
|
+ blocks_to_go * ' ' # Uncompleted blocks
|
||||||
+ '\x1b[7m|\x1b[0m' # End the bar
|
+ '\x1b[7m|\x1b[0m' # End the bar
|
||||||
+ ' '
|
+ ' '
|
||||||
+ msg # Add message
|
+ msg # Add message
|
||||||
+ '\x1b[7h' # Enable line wrapping
|
+ '\x1b[?7h' # Enable line wrapping
|
||||||
+ '\r', # Go back to the start
|
+ '\r', # Go back to the start
|
||||||
end='')
|
end='')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user