title: Set global output precision python
body: <p>I've written a library of functions to make my engineering homework easier, and use them in the python interpreter (kinda like a calculator). Some return matrices, some return floats. </p>
  
  <p>The problem is, they return too many decimals. For example, currently, when a number is 0, I get an extremely small number as a return (e.g. 6.123233995736766e-17)</p>
  
  <p>I know how to format outputs individually, but that would require adding a formatter for every line I type in the interpreter. I'm using python 2.6.</p>
  
  <p><strong>Is there a way to set the global output formatting (precision, etc...) for the session?</strong> </p>
  
  <p>*Note: For scipy functions, I know I can use</p>
  
  <pre><code>scipy.set_printoptions(precision = 4, suppress = True)
  </code></pre>
  
  <p>but this doesn't seem to work for functions that don't use scipy.</p>