tamcolors.tam package¶
Submodules¶
tamcolors.tam.tam_loop module¶
-
class
tamcolors.tam.tam_loop.
TAMFrame
(fps, char, foreground_color, background_color, min_width=0, max_width=1000, min_height=0, max_height=1000)¶ Bases:
object
-
done
(tam_loop, loop_data)¶ info: will clean up the frame and can only be called once :param tam_loop: TAMLoop :param loop_data: dict :return:
-
draw
(tam_buffer, loop_data)¶ info: will draw frame onto terminal :param tam_buffer: TAMBuffer :param loop_data: dict :return:
-
get_defaults
()¶ info: gets defaults :return: (str, int, int)
-
get_fps
()¶ info: returns the frame fps :return: int
-
get_height_min_and_max
()¶ info: returns min and max height :return: (int, int)
-
get_width_min_and_max
()¶ info: returns min and max width :return: (int, int)
-
make_buffer_ready
(tam_buffer, screen_width, screen_height)¶ info: will make buffer ready for frame :param tam_buffer: TAMBuffer :param screen_width: int: 0 - inf :param screen_height: int: 0 - inf :return:
-
update
(tam_loop, keys, loop_data)¶ info: will update terminal :param tam_loop: TAMLoop :param keys: list, tuple :param loop_data: dict :return:
-
-
class
tamcolors.tam.tam_loop.
TAMLoop
(tam_frame, io_list=None, any_os=False, only_any_os=False, color_change_key='ESCAPE', loop_data=None, stability_check=False, tam_color_defaults=True)¶ Bases:
object
-
add_frame_stack
(frame)¶ info: will add a TAMFrame to stack :param frame: TAMFrame :return:
-
done
(reset_colors_to_console_defaults=True)¶ info: will stop tam loop :param: reset_colors_to_console_defaults: bool :return:
-
get_color
(spot)¶
-
get_running
()¶ info: None has not ran, True is running, False has ran :return: bool or None
-
pop_frame_stack
()¶ info: will remove TAMFrame from stack :return: TAMFrame or None
-
reset_colors_to_console_defaults
()¶
-
run
()¶ info: will call tam loop :return:
-
static
run_application
(*args, **kwargs)¶ info: will run tam loop as an application note: when tam loop is done running the program will quit if tam loop has an error and the frame does not catch it the error will be printed onto the screen and the program will quit after user input :param args: :param kwargs: :return:
-
set_color
(spot, color)¶
-
set_tam_color_defaults
()¶
-
-
exception
tamcolors.tam.tam_loop.
TAMLoopError
¶ Bases:
Exception
tamcolors.tam.tam_loop_test module¶
-
class
tamcolors.tam.tam_loop_test.
TAMLoopTest
(tam_frame, io_list=None, any_os=False, only_any_os=False, color_change_key='ESCAPE', loop_data=None)¶ Bases:
object
-
add_frame_stack
(frame)¶ info: will add a TAMFrame to stack :param frame: TAMFrame :return:
-
done
()¶ info: will stop tam loop :return:
-
get_color
(spot)¶
-
get_running
()¶ info: None has not ran, True is running, False has ran :return: bool or None
-
pop_frame_stack
()¶ info: will remove TAMFrame from stack :return: TAMFrame or None
-
reset_colors_to_console_defaults
()¶
-
run
()¶ info: will call tam loop :return:
-
set_color
(spot, color)¶
-
set_tam_color_defaults
()¶
-
update
(keys, width, height)¶ info: will update TAMLoopTest :param keys: list or tuple: ((str, str), …) :param width: int, 0 - inf :param height: int, 0 - inf :return: (None or TAMBuffer, None or TAMFrame)
-