summaryrefslogtreecommitdiff
path: root/output.py
diff options
context:
space:
mode:
Diffstat (limited to 'output.py')
-rw-r--r--output.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/output.py b/output.py
index 870d618..c8bb542 100644
--- a/output.py
+++ b/output.py
@@ -3,11 +3,19 @@
# Copyright © 2019-2020 Adélie Linux team. All rights reserved.
# NCSA license.
#
+import functools
import subprocess
+@functools.total_ordering
class _Cell:
def __init__(self, content):
self.content = content
+ def __eq__(self, other):
+ return self.content == other.content
+ def __lt__(self, other):
+ return self.content < other.content
+ def __hash__(self):
+ return hash(self.content)
_ANSI_CLEAR = "\033[0;00m"