magmax / python-readchar

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

Readchar returning spaces when run asynchronously #55

Closed Yourself1011 closed 2 years ago

Yourself1011 commented 4 years ago

I'm creating a game and I would like to make a pause function when the user presses "p", so I use threading to asynchronously run readchar. The issue is, when I do this, the text becomes deformed with extra spaces after each line.

Before readchar: image

After readchar: image

insidewhy commented 3 years ago

hi @Yourself1011 my PR fixes this issue, see https://github.com/magmax/python-readchar/pull/54

insidewhy commented 3 years ago

Also this is a duplicate of https://github.com/magmax/python-readchar/issues/53

magmax commented 3 years ago

Already merged. Should be fixed at v3.0.1. Can you confirm it?

shasheene commented 2 years ago

Writing this comment to note the fix was reverted in v3.0.4 https://github.com/magmax/python-readchar/pull/54

Installing v3.0.3 worked fine for my purposes though: https://pypi.org/project/readchar/3.0.3/

Cube707 commented 2 years ago

should be fixed in v4.0.0