This class represents an action that should be run repeatedly in an interval. It is similar to python’s
own threading.Timer class, but instead of only running once the function will be run again and again,
sleeping the stated interval in between.

RepeatedTimers are started, as with threads, by calling their start() method. The timer can be stopped (in
between runs) by calling the cancel() method. The interval the time waited before execution of a loop may
not be exactly the same as the interval specified by the user.

interval (float or callable) – The interval between each function call, in seconds. Can also be a callable
returning the interval to use, in case the interval is not static.

function (callable) – The function to call.

args (list or tuple) – The arguments for the function call. Defaults to an empty list.

kwargs (dict) – The keyword arguments for the function call. Defaults to an empty dict.

run_first (boolean) – If set to True, the function will be run for the first time before the first wait period.
If set to False (the default), the function will be run for the first time after the first wait period.

condition (callable) – Condition that needs to be True for loop to continue. Defaults to lambda:True.

on_condition_false (callable) – Callback to call when the timer finishes due to condition becoming false. Will
be called before the on_finish callback.

on_cancelled (callable) – Callback to call when the timer finishes due to being cancelled. Will be called
before the on_finish callback.

on_finish (callable) – Callback to call when the timer finishes, either due to being cancelled or since
the condition became false.

A decorator for deprecated methods. Logs a deprecation warning via Python’s :mod:`warnings module including the
supplied message. The call stack level used (for adding the source location of the offending call to the
warning) can be overridden using the optional stacklevel parameter. If both since and includedoc are
provided, a deprecation warning will also be added to the function’s docstring by providing or extending its __doc__
property.

Parameters:

message (string) – The message to include in the deprecation warning.

stacklevel (int) – Stack level for including the caller of the offending method in the logged warning. Defaults to 1,
meaning the direct caller of the method. It might make sense to increase this in case of the function call
happening dynamically from a fixed position to not shadow the real caller (e.g. in case of overridden
getattr methods).

includedoc (string) – Message about the deprecation to include in the wrapped function’s docstring.

extenddoc (boolean) – If True the original docstring of the wrapped function will be extended by the deprecation
message, if False (default) it will be replaced with the deprecation message.

since (string) – Version since when the function was deprecated, must be present for the docstring to get extended.

Tries to find a collision free translation of “<filename>.<extension>” to the 8.3 DOS compatible format,
preventing collisions with any of the existing_filenames.

First strips all of ."/\[]:;=, from the filename and extensions, converts them to lower case and truncates
the extension to a maximum length of 3 characters.

If the filename is already equal or less than 8 characters in length after that procedure and “<filename>.<extension>”
are not contained in the existing_files, that concatenation will be returned as the result.

If not, the following algorithm will be applied to try to find a collision free name:

This will basically – for a given original filename of some_filename and an extension of gco – iterate
through names of the format some_f~1.gco, some_f~2.gco, …, some_~10.gco, some_~11.gco, …,
<prefix>~<n>.gco for n less than 10 ^ max_power, returning as soon as one is found that is not colliding.

Parameters:

filename (string) – The filename without the extension to convert to 8.3.

extension (string) – The extension to convert to 8.3 – will be truncated to 3 characters if it’s longer than
that.

existing_filenames (list) – A list of existing filenames to prevent name collisions with.

max_power (int) – Limits the possible attempts of generating a collision free name to 10 ^ max_power
variations. Defaults to 2, so the name generation will maximally reach <name>~99.<ext> before
aborting and raising an exception.

Returns:

A 8.3 representation of the provided original filename, ensured to not collide with the provided

Converts the provided input filename to a 8.3 DOS compatible filename. If existing_filenames is provided, the
conversion result will be guaranteed not to collide with any of the filenames provided thus.

A decorator for methods pending deprecation. Logs a pending deprecation warning via Python’s :mod:`warnings module
including the supplied message. The call stack level used (for adding the source location of the offending call to
the warning) can be overridden using the optional stacklevel parameter. If both since and includedoc are
provided, a deprecation warning will also be added to the function’s docstring by providing or extending its __doc__
property.

Parameters:

message (string) – The message to include in the deprecation warning.

stacklevel (int) – Stack level for including the caller of the offending method in the logged warning. Defaults to 1,
meaning the direct caller of the method. It might make sense to increase this in case of the function call
happening dynamically from a fixed position to not shadow the real caller (e.g. in case of overridden
getattr methods).

extenddoc (boolean) – If True the original docstring of the wrapped function will be extended by the deprecation
message, if False (default) it will be replaced with the deprecation message.

includedoc (string) – Message about the deprecation to include in the wrapped function’s docstring.

since (string) – Version since when the function was deprecated, must be present for the docstring to get extended.