
- #How to make my printer print 99 percent grey full
- #How to make my printer print 99 percent grey code
#How to make my printer print 99 percent grey full
Part_ticks = num_ticks % 8 # Size of partial block (array index)īar += utf_8s * int(full_ticks) # Add full blocks into Progress Bar Num_ticks = int(round(perc / 100 * max_ticks))įull_ticks = num_ticks / 8 # Number of full blocks Perc = 100 * float(step) / float(total_steps)
#How to make my printer print 99 percent grey code
The code is straight forward, but a bit longer than the other answers: def percent_complete(step, total_steps, bar_width=60, title="", print_perc=True): The step was the current row number as each Stack Exchange Markdown Q&A was converted to Kramdown (for GitHub Pages). The total_steps was about 2,500 for len(rows) in Stack Exchange Data Dump in CSV format. gif the function was called using: percent_complete(step, total_steps, title="Convert Markdown")

Set progress bar color, the default is green.Ĭalling the progress display is pretty straight forward.Variable length progress bar that defaults to 60 characters or 480 "ticks".Optional percentage complete at end of line.Without ticks, each character would only be 1.67 %. Using 60 characters, divide them into 480 "ticks" to yield 0.21 % per tick.


