title: Python: How to display the position of a counter in a variable range as a text bar (similar to the progress bar)?
body: <p>I'm trying to have a dynamic display for a continuously changing positive number in a range that is also changing. For concrete example, lets imagine its representing the dynamic price of a stock where the range is its current daily range.</p>
  <p>Say the symbol is X, which opened at $100 today, went unto $125 intra-day and is now trading at $112.5. So ideally I'd like to display it as a dynamic progress bar:</p>
  <pre><code>X [####   ] 112.5 [100, 125]
  </code></pre>
  <p>If the stock then goes to 130 in the same day, the same progress bar should now look like</p>
  <pre><code>X [########] 130 [100, 130]
  </code></pre>
  <p>(Note: I'm placing no restriction on whether the <em>length</em> of the progress bar should change with increase in range - all i'm asking is that the current price should be accurately represented as a percentage of the range visually.)</p>
  <p>Any ideas what packages I should look at (I really would prefer not having to implement it from scratch!!)</p>
  <p>Please suggest a python 3.x approach if possible as well.</p>