Skip to content

Commit 949cdf0

Browse files
author
Olivier Brunel
committed
New default chars to display progress bar
1 parent 9a3f048 commit 949cdf0

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

ProgressBar.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55

66
class ProgressBar:
77
def __init__(self,
8-
pretext="", # Text to print before the bar
9-
progresschar="-", # Character to show progress
10-
loadingchars=r"\|/", # Last character of bar moving as bar loads (moves even if no progress)
11-
startendchar="[]", # Characters going around the bar
8+
pretext=r"", # Text to print before the bar
9+
progresschar=r"█", # Character to show progress
10+
loadingchars=r"█▓▒░▒▓", # Last character of bar moving as bar loads (moves even if no progress)
11+
startendchar=r"||", # Characters going around the bar
1212
barwidth=int(os.get_terminal_size().columns/2), # Length of the bar in characters (does not include what's around the bar)
1313
displaypercentage=False, # Show percentage as well or not
1414
displaycount=False # Show count as well or not

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ for i in range(0,max)
3636
### Style parameters
3737
You can give the following optional arguments to the ProgressBar constructor:
3838
- pretext: Text to print before the bar (default "")
39-
- progresschar: Character to show progress (default '-')
40-
- loadingchars: Last character of bar moving as bar loads (moves even if no progress) (default "\\|/")
41-
- startendchar: Characters going around the bar (default "[]")
39+
- progresschar: Character to show progress (default '')
40+
- loadingchars: Last character of bar moving as bar loads (moves even if no progress) (default "█▓▒░▒▓")
41+
- startendchar: Characters going around the bar (default "||")
4242
- barwidth: Length of the bar in characters (does not include optionally printed pretext, progresschar, percentage and count) (default terminal width/2)
4343
- displaypercentage: Show percentage as well or not (default False)
4444
- displaycount: Show count as well or not (default False)

0 commit comments

Comments
 (0)