Can't install on windows
rhelmstedter opened this issue · 4 comments
getkey
doesn't work on windows. There is a workaround. Should try to find a different library that is maintained.
Oh, awesome! Glad to see a workaround for this (I thought it was just me!). I was going to try to contribute a small feature (first open-source contribution) but I could not get past this error. As soon as I have more time I'll try again to contribute my feature on the fork I made. Thanks for bringing this to the project issues so I could see it and try the workaround.
Glad it worked for you. @JnyJny was looking into doing something with the pager so we can remove getkey as a dependency and close this issue.
If getkey is the only problem, I think we can get rid of it entirely but either replacing the exit condition for the bite display with an keyboard interrupt (mostly Ctrl + C) or by displaying the information without a Live context manager that seems only necessary for updating information and not for static display. Will try to make a PR
I played a little bit and came up with two solutions:
- we can replace the
quit_display
function with a simple while loop that does nothing but catches anKeyboardInterrupt
Exception, upon which we leave the Live context - it seems to be even simpler to just create a new console object and print the current static layout:
This way I was able to create the display in the terminal
from rich.console import Console console = Console() console.print(layout)