jquast / blessed

Blessed is an easy, practical library for making python terminal apps

Home Page:http://pypi.python.org/pypi/blessed

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"Enter" is required to show printed

opened this issue · comments

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 :)