"Enter" is required to show printed
opened this issue · comments
Deleted user commented
Sorry if this is the wrong place to ask, but I'm getting desperate.
In this very basic snippet I just want to print whatever is entered:
from blessed import Terminal
term = Terminal()
with term.cbreak():
while True:
print(term.inkey(), end='')
However, nothing shows up on screen until I hit Enter. Then everything gets printed at once.
It also works when I leave out "end=''", but I don't want a linebreak here.
Why does it behave like this? Have I misunderstood something? Thanks in advance!
Jeff Quast commented
Add argument, flush=True to the print function
Deleted user commented
Holy smokes you're fast! Thanks, it works :)