in aristotle/aristotle.py [0:0]
def print_stats(self, key, keyonly=False, sids=None):
"""Print statistics (total, enabled, disabled) for specified key and its values.
:param key: key to print statistics for.
:type key: string, required
:param keyonly: only print stats for the key itself and not stats for all possible key-value pairs, defaults to `False`.
:type keyonly: bool, optional
:param sids: list of SIDs to scope stats to. If None, global list will be used downstream.
:type sids: list, optional
"""
stats_str = self.get_stats(key=key, keyonly=keyonly, sids=sids)
if stats_str:
if stats_str[-1] == '\n':
stats_str = stats_str[:-1]
print("{}".format(stats_str))
return True
else:
print_warning("No statistics to print.")
return False