[gjs: 1/2] heapgraph.py: adjust terminal output style * don't use colors in terminal output * remove unused lab
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs: 1/2] heapgraph.py: adjust terminal output style * don't use colors in terminal output * remove unused lab
- Date: Sun, 15 Apr 2018 05:42:38 +0000 (UTC)
commit 7f3fad6c552ee461537137b25e8b92394e171db1
Author: Andy Holmes <andrew g r holmes gmail com>
Date: Mon Apr 9 20:18:07 2018 -0700
heapgraph.py: adjust terminal output style
* don't use colors in terminal output
* remove unused label function
tools/heapgraph.py | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
---
diff --git a/tools/heapgraph.py b/tools/heapgraph.py
index d8f8ea6d..0725959f 100755
--- a/tools/heapgraph.py
+++ b/tools/heapgraph.py
@@ -301,7 +301,6 @@ tree_graph_paths = {}
class style:
- DIM = '\033[30m'
BOLD = '\033[1m'
ITALIC = '\033[3m'
UNDERLINE = '\033[4m'
@@ -352,13 +351,6 @@ def get_node_label(graph, addr):
return label[:50]
-def get_root_label(graph, root):
- # This won't work on Windows.
- #label = re.sub(r'0x[0-9a-f]{8}', '*', graph.root_labels[root])
- label = graph.root_labels[root]
- return '(ROOT) {}'.format(label)
-
-
def output_tree_graph(graph, data, base='', parent=''):
while data:
addr, children = data.popitem()
@@ -375,9 +367,9 @@ def output_tree_graph(graph, data, base='', parent=''):
# Color/Style
if os.isatty(1):
if parent:
- edge = style.DIM + edge + style.END
- else:
edge = style.ITALIC + edge + style.END
+ else:
+ edge = style.BOLD + edge + style.END
orig = style.UNDERLINE + 'jsobj@' + addr + style.END
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]