Set the text of a cell according to a [format][1] string.

    [1]: https://docs.python.org/2/library/string.html#formatstrings

    Args:

        tree_column (gtk.TreeViewColumn) : Tree view to append columns to.
        model_column_index (int) : Index in list store model corresponding to
            tree view column.
        format_str (str) : Format string as accepted by Python string `format`
            method (e.g., `'{value}'`).  N.B., the value of a cell is passed to
            the `format` method as a keyword argument.
        cell_renderer (gtk.CellRenderer) : Cell renderer for column.  If
            `None`, defaults to all cell renderers for column.

    Returns:

        None

def set_column_format(tree_column, model_column_index, format_str,
                      cell_renderer=None):
    '''
    Set the text of a cell according to a [format][1] string.

    [1]: https://docs.python.org/2/library/string.html#formatstrings

    Args:

        tree_column (gtk.TreeViewColumn) : Tree view to append columns to.
        model_column_index (int) : Index in list store model corresponding to
            tree view column.
        format_str (str) : Format string as accepted by Python string `format`
            method (e.g., `'{value}'`).  N.B., the value of a cell is passed to
            the `format` method as a keyword argument.
        cell_renderer (gtk.CellRenderer) : Cell renderer for column.  If
            `None`, defaults to all cell renderers for column.

    Returns:

        None
    '''
    def set_property(column, cell_renderer, list_store, iter, store_i):
        value = list_store[iter][store_i]
        cell_renderer.set_property('text', format_str.format(value=value))
    if cell_renderer is None:
        cells = tree_column.get_cells()
    else:
        cells = [cell_renderer]
    for cell_renderer_i in cells:
        tree_column.set_cell_data_func(cell_renderer_i, set_property,
                                       model_column_index)