RestOC.CLI module

CLI Module

Holds methods for doing CLI things

class RestOC.CLI.ProgressBar(title='Progress Bar', total=100, sections=20, start=0)

Bases: object

Progress Bar

Generates a progress bar for use in terminals

__add__(other)
  • (overloaded)

Handles adding to the count

Parameters

other (uint) – Should be an unsigned number

Returns

None

__init__(title='Progress Bar', total=100, sections=20, start=0)

Constructor

Initialises the instance of the object

Parameters
  • title (str) – The text before the progress bar

  • total (int) – The total count of items

  • sections (int) – The number of sections in the progress bar

  • start (int) – Optional, defaults to 0

Returns

ProgressBar

clear()

Clear

Clears the screen

Returns

None

draw()

Draw

Draws the progress bar in the terminal

Returns

None