Closed ghost closed 2 years ago
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!
Add argument, flush=True to the print function
Holy smokes you're fast! Thanks, it works :)
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:
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!