- terminal emulator (with true color support)
- python3
pip install pytermcanvas
- x_size (Int) - number of columns to use, stored in self.cols
- y_size (Int) - number of rows to use, stored in self.rows
- auto_render (Bool) [default:
True
]True
- enable automatic canvas renderingFalse
- disable automatic canvas rendering
- empty_char (Char) [default:
SPACE
] - character used to fill the canvas on creation
Renders canvas
Clears canvas
- x_size (Int) - number of columns to use, stored in self.cols
- y_size (Int) - number of rows to use, stored in self.rows
Draws image on canvas
- path (Str) - path to image
- mode (Str) [default:
bg
] - mode to use for renderingbg
- change color behind characterfg
- change color of specified character
- size (List or Tuple) [default: canvas size] - desired size of image
- size[0] (Int) - number of columns to use
- size[1] (Int) - number of rows to use
- char (Char) [defualt:
SPACE
] - character to print, mainly used forfg
rendering
Draws rectangle on canvas
- col (Int) - position of top left corner in column
- row (Int) - position of top left corner in row
- width (Int) - width of rectangle
- height (Int) - height of rectangle
- mode (Str) [default:
bg
] - mode to use for renderingbg
- change color behind characterfg
- change color of specified character
- color (List or Tuple) [default:
(255, 255, 255)
] - RGB color of rectangle- color[0] (Int) - Red,
0 - 255
- color[1] (Int) - Green,
0 - 255
- color[2] (Int) - Blue,
0 - 255
- color[0] (Int) - Red,
- char (Char) [defualt:
SPACE
] - character to print, mainly used forfg
rendering
Inserts set of characters to specified row
- row (Int) - row to insert data to
- data (Str, List or Tuple) - data inserted into desired row
- (Str) - standard string
- (List or Tuple) - sequence of characters
- offset (Int) [default:
0
] - defines the starting column
Inserts set of characters to specified column
- col (Int) - column to insert data to
- data (Str, List or Tuple) - data inserted into desired column
- (Str) - standard string
- (List or Tuple) - sequence of characters
- offset (Int) [default:
0
] - defines the starting row
Returns list of characters from specified row
- row (Int) - row to fetch data from
Returns list of characters from specified column
- col (Int) - column to fetch data from
Changes character on specified location
- col (Int) - column of character
- row (Int) - row of character
- char (Char) - replacement character
Returns character from specified location
- col (Int) - column of character
- row (Int) - row of character