title: Python: Hello world with Flask gives me an error related to app.run(debug=True)
body: <p>I am new to Flask (and quite new to python) and I have tried running the following very basic script:</p>
  
  <pre><code>from flask import Flask
  app= Flask(__name__)
  @app.route('/')
  def home():
      return "This is the homepage"
  if __name__=="__main__":
      app.run(debug=True)
  </code></pre>
  
  <p>I am using Python 3.6 and IDLE on Windows 10. 
  The problem is I keep getting the following error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:/Users/Susy/Desktop/provaflask.py", line 7, in &lt;module&gt;
      app.run(debug=True)
    File "C:\Users\Susy\AppData\Local\Programs\Python\Python36\lib\site-packages\flask\app.py", line 936, in run
      cli.show_server_banner(self.env, self.debug, self.name, False)
    File "C:\Users\Susy\AppData\Local\Programs\Python\Python36\lib\site-packages\flask\cli.py", line 630, in show_server_banner
      click.echo(message)
    File "C:\Users\Susy\AppData\Local\Programs\Python\Python36\lib\site-packages\click\utils.py", line 217, in echo
      file = _default_text_stdout()
    File "C:\Users\Susy\AppData\Local\Programs\Python\Python36\lib\site-packages\click\_compat.py", line 621, in func
      rv = wrapper_func()
    File "C:\Users\Susy\AppData\Local\Programs\Python\Python36\lib\site-packages\click\_compat.py", line 385, in get_text_stdout
      rv = _get_windows_console_stream(sys.stdout, encoding, errors)
    File "C:\Users\Susy\AppData\Local\Programs\Python\Python36\lib\site-packages\click\_winconsole.py", line 261, in _get_windows_console_stream
      func = _stream_factories.get(f.fileno())
  io.UnsupportedOperation: fileno
  </code></pre>
  
  <p>From <a href="https://stackoverflow.com/questions/31080829/python-error-io-unsupportedoperation-fileno">this question</a>, the problem seems to be related to the use of IDLE, however I would like to keep using it, so can you please help? Thank you!</p>