Skip to content

How to Print to stdout in Flask using Python

If you are trying to print() to the console/stdout in your Flask app, but nothing is happening, then you just need to flush your prints, as follows:

print('This will print', flush=True)
Code language: Python (python)

See also  How to Save a Python Dictionary to a File in Python
Tags:
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x