title: Write function result to stdin
body: <p>I'm trying to write the results of a function to stdin.</p>
  
  <p>This is the code :</p>
  
  <pre><code>def testy():
      return 'Testy !'
  
  import sys
  sys.stdin.write(testy())
  </code></pre>
  
  <p>And the error I get is :</p>
  
  <pre><code>Traceback (most recent call last):
    File "stdin_test2.py", line 7, in &lt;module&gt;
      sys.stdin.write(testy())
  io.UnsupportedOperation: not writable
  </code></pre>
  
  <p>I'm not completely sure, is this the right way of doing things ?</p>