diff --git a/lib/xmet/util.py b/lib/xmet/util.py index f6ccf12..d16372a 100644 --- a/lib/xmet/util.py +++ b/lib/xmet/util.py @@ -29,3 +29,11 @@ def each_chunk(fh: io.TextIOBase, sep: str, strip=None): if ret != '': yield ret + +def cmp(a, b): + if a == b: + return 0 + elif a > b: + return -1 + elif a < b: + return 1