rez.util

Misc useful stuff. TODO: Move this into rez.utils.?

class rez.util.ProgressBar(label, max)[source]

Bases: rez.vendor.progress.bar.Bar

rez.util.dedup(seq)[source]

Remove duplicates from a list while keeping order.

rez.util.find_last_sublist(list_, sublist)[source]

Given a list, find the last occurance of a sublist within it.

Returns

Index where the sublist starts, or None if there is no match.

rez.util.get_close_matches(term, fields, fuzziness=0.4, key=None)[source]
rez.util.get_close_pkgs(pkg, pkgs, fuzziness=0.4)[source]
rez.util.is_non_string_iterable(arg)[source]

Python 2 and 3 compatible non-string iterable identifier

rez.util.shlex_join(value, unsafe_regex=None, replacements=None, enclose_with='"')[source]

Join args into a valid shell command.

rez.util.which(*programs, **shutilwhich_kwargs)[source]