kennethreitz/spark.py — pull request #1 by InScopeApps (2011-11-16 09:30:40+00:00)
Title: Fixed issues with the math and some other tweaks

The math could produce divide by 0 exceptions and indices outside of
the range of the ticks set, examples: 1 2 3, 0-10, and 345 234 234 324
253.
Added early exits if the length of ints is 0 or 1.
Using a string instead of a set for the ticks.
Add `if __name__ == '__main__':` to support running from the command
line.
I removed the space in the join because there isn't a space in
@holman's code. This causes the bars to overlap in Terminal, but this
seems like a font issue in Terminal.