title: How to print from Flask @app.route to python console
body: <p>I would like to simply print a "hello world" to the python console after /button is called by the user.</p>
  
  <p>This is my naive approach:</p>
  
  <pre><code>@app.route('/button/')
  def button_clicked():
      print 'Hello world!'
      return redirect('/')
  </code></pre>
  
  <p>Background: I would like to execute other python commands from flask (not shell). "print" should be the easiest case.
  I believe I have not understood a basic twist here.
  Thanks in advance!</p>