console
console copied to clipboard
Comprehensive utility library for terminals. “Better… Stronger… Faster.”
The utils module of console is mentioned in a stackoverflow answer about waiting for key presses, but it's actually not exported outside the package so it's unusable :P
``` Traceback (most recent call last): File "/home/mgmiller/Desktop/verify_times.py", line 79, in delta = fx.bold(1.20) File "/media/Data/repos/libs/console/console/core.py", line 481, in __call__ pos = text.find('\n', 0, MAX_NL_SEARCH) # if '\n' in text,...
`python -m console.beep` does work however.
I found pylint failed on a simple `import console` unless I installed future-fstrings. perhaps that needs to be added as a dependency? here's the output of pylint for a 1...
env `NO_COLOR=1` turns off `fx.italic` as well. This was not intended, although I could imagine a argument to keep it. `tty=false` should disable everything, but NO_COLOR et al, probably shouldn't.
i have this issue even i have install it and it work but when i convert py to exe i have this issue ``` Traceback (most recent call last): File...
https://stackoverflow.com/questions/983354/how-do-i-wait-for-a-pressed-key/34956791?noredirect=1#comment130810896_34956791 ``` >>> from console.utils import wait_key >>> wait_key() 'h' ``` Looks like we want `msvcrt.getwch()` and some function key pre-processing: https://docs.python.org/3.8/library/msvcrt.html#msvcrt.getwch