diff --git a/setup.py b/setup.py index 7e57f31..ef11bd7 100644 --- a/setup.py +++ b/setup.py @@ -17,7 +17,7 @@ setup( name='zoomeye', - version='2.0.4.0', + version='2.0.4.1', description='Python library and command-line tool for ZoomEye (https://www.zoomeye.org/doc)', long_description=README, long_description_content_type='text/x-rst', diff --git a/zoomeye/plotlib.py b/zoomeye/plotlib.py index 1d3494b..b1a06b0 100644 --- a/zoomeye/plotlib.py +++ b/zoomeye/plotlib.py @@ -37,7 +37,6 @@ def show_pie_chart(stat): :param stat: list, all data and label """ - print() if len(stat) > len(config.COLOR_TABLE): raise ("max support 10 items") @@ -64,7 +63,6 @@ def show_pie_chart(stat): else: print(ch) count += 1 - print() def unicode_output(): @@ -128,7 +126,6 @@ def generate_histogram(values, labels=None, force_ascii=False): :param force_ascii: bool, unicode or ascii output return :None """ - print() # max length and bar width matrix = get_matrix(values, 36, 1) @@ -163,8 +160,8 @@ def generate_histogram(values, labels=None, force_ascii=False): r = trim_zeros(row) data.append("".join(chars[item] for item in r)) out.append(fmt.format(*data)) - result = '\n'.join(out) + '\n' - print(result) + for item in out: + print(' ' + item) diff --git a/zoomeye/show.py b/zoomeye/show.py index de2e5f1..cb5ab69 100644 --- a/zoomeye/show.py +++ b/zoomeye/show.py @@ -151,8 +151,8 @@ def print_facets(facets, facet_data, total, figure): return # print facet data - print('-' * 30) - printf("ZoomEye total data:{}".format(total)) + print(' ' + '-' * 40) + printf(" ZoomEye total data:{}".format(total), color='green') for facet in facets.split(","): names = [] counts = [] @@ -207,13 +207,13 @@ def print_stat(keys, stat_data, num, figure): """ if not stat_data: return - print('-' * 30) - printf("current total data:{}".format(num), color='green') + print(' ' + '-' * 40) + printf(" current total data:{}".format(num), color='green') for key in keys.split(','): - print('{:-^40}'.format(key + " data")) + print(' {:-^40}'.format(key + " data")) # print title if figure is None: - printf("{:<35}{:<20}".format(key, "count"), color="green") + printf(" {:<35}{:<20}".format(key, "count"), color="green") # sort by the amount of each data item = stat_data.get(key) @@ -221,7 +221,7 @@ def print_stat(keys, stat_data, num, figure): # print result if figure is None: for name, count in sorted_item: - printf("{:<35}{:<20}".format(name, count)) + printf(" {:<35}{:<20}".format(name, count)) names = [] counts = []