import sys @ app.route('/ button /') def button_clicked(): print ('Hello world!',file = sys.stderr ) return redirect('/ ')