Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions data_hacks/bar_chart.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ def run(input_stream, options):
if options.percentage:
percentage = " (%0.2f%%)" % (100 * Decimal(value) / Decimal(total))
print str_format % (key[:max_length], value, (value / scale) * "∎", percentage)
try:
sys.stdout.flush()
except IOError:
pass

if __name__ == "__main__":
parser = OptionParser()
Expand Down