lucia.utils package

Submodules

lucia.utils.instance_checker module

class lucia.utils.instance_checker.InstanceChecker(f)

Bases: object

is_running()

lucia.utils.network module

lucia.utils.network.read_message(sock, decryptor_function)
lucia.utils.network.recvall(sock, n)
lucia.utils.network.send_message(sock, encryptor_function, msg)

lucia.utils.number_to_words module

lucia.utils.number_to_words.number_to_words(number, include_and=False)

returns a string representation for the given number

lucia.utils.rotation module

class lucia.utils.rotation.Vector(x=0.0, y=0.0, z=0.0)

Bases: object

coords
get_coords()
get_tuple
set_coords(cords)
lucia.utils.rotation.calculate_x_y_angle(x1, y1, x2, y2)
lucia.utils.rotation.calculate_x_y_string(deg)
lucia.utils.rotation.dir_to_string(facing)
lucia.utils.rotation.get_1d_distance(x1, x2)
lucia.utils.rotation.get_2d_distance(x1, y1, x2, y2)
lucia.utils.rotation.get_3d_distance(x1, y1, z1, x2, y2, z2)
lucia.utils.rotation.getdir(facing)
lucia.utils.rotation.move(coords, deg=0.0, zdeg=0.0)
lucia.utils.rotation.snapleft(direction, inc=45)
lucia.utils.rotation.snapright(direction, inc=45)
lucia.utils.rotation.turnleft(deg, inc=5)
lucia.utils.rotation.turnright(deg, inc=5)

lucia.utils.timer module

class lucia.utils.timer.Timer

Bases: object

A timer class, to track time mesured in millis

elapsed

Returns the exact elapsed time since this timer was created or last restarted.

pause()

Pauses the timer at a certain position.

restart()

Restarts the timer, and set it’s elapsed time to 0.

resume()

Resumes the timer after being paused.

Module contents