Cache for nodes; icons overlap; colors; new icons.

This commit is contained in:
Sergey Vartanov 2015-07-31 12:21:39 +03:00
parent b976e4b5d8
commit 64aa1432ee
5 changed files with 1052 additions and 692 deletions

12
ui.py
View file

@ -1,3 +1,5 @@
# -*- coding: utf-8 -*- from __future__ import unicode_literals
"""
Author: Sergey Vartanov (me@enzet.ru).
"""
@ -5,12 +7,14 @@ Author: Sergey Vartanov (me@enzet.ru).
import sys
def write_line(number, total):
length = 20
if number == -1:
print ('%3s' % '100') + ' %: [' + (100 * '=') + '].'
print ('%3s' % '100') + ' %' + (length * '') + ''
elif number % 1000 == 0:
p = number / float(total)
l = int(p * 100)
print ('%3s' % str(int(p * 1000) / 10)) + ' %: [' + (l * '=') + \
((100 - l) * ' ') + '].'
l = int(p * length)
print ('%3s' % str(int(p * 1000) / 10)) + ' %' + (l * '') + \
((length - l) * ' ') + ''
sys.stdout.write("\033[F")