magmax / python-readchar

Python library to read characters and key strokes
MIT License
143 stars 45 forks source link

while `readchar` is running there is no linefeed after each print #53

Closed insidewhy closed 3 years ago

insidewhy commented 4 years ago

If I run readchar in one thread and then:

print("hello")
print("goodbye")

I get the following output:

hello
     goodbye

Instead of:

hello
goodbye
insidewhy commented 4 years ago

I think this can be solved by changing this line:

https://github.com/magmax/python-readchar/blob/master/readchar/readchar_linux.py#L14

Change setraw to setcbreak.