title: Print number in engineering format
body: <p>I am trying to print a number into engineering format with python, but I cannot seem to get it to work. The syntax SEEMS simple enough, but it just doesn't work. </p>
  
  <pre><code>&gt;&gt;&gt; import decimal 
  &gt;&gt;&gt; x = decimal.Decimal(1000000)
  &gt;&gt;&gt; print x
  1000000
  &gt;&gt;&gt;&gt; print x.to_eng_string() 
  1000000
  </code></pre>
  
  <p>I cannot figure out why this is. The two values are not equal (one is a string, the other is an int). Setting various contexts in <code>decimal</code> doesn't seem to help either. Any clues or ideas?</p>