Tools to help with text mode (i.e. non-GUI) input
I'm looking for Python packages that can help with text mode input, i.e. for use with non-GUI programs that one runs from the command prompt in a terminal window running a bash shell or some such. What I'm specifically after is a way to provide a default value that can be accepted or changed easily and also a way to provide a number of different values to choose from. I.e. for the default sort of input one might see:- Colour? red Hitting return would return 'red' to the program but you could also backspace over the 'red' and enter something else. Maybe even better would be that the 'red' disappears as soon as you hit any key other than return. For the select a value type of input I want something like the above but hitting (say) arrow up and arrow down would change the value displayed by the 'Colour?' prompt and hitting return would accept the chosen value. In addition I want the ability to narrow down the list by entering one or more initial characters, so if you enter 'b' at the Colour? prompt the list of values presented would only include colours starting with 'b' (beige, blue, black, etc.) Are there any packages that offer this sort of thing? I'd prefer ones from the Debian repositories but that's not absolutely necessary. It might also be possible/useful to use the mouse for this. -- Chris Green · -- https://mail.python.org/mailman/listinfo/python-list
Using pipx for packages as opposed to applications
Can one use pipx to wrap the process of creating an independent environment for a python package as opposed to a runnable application? E.g. I want to install and use pksheet but, as it's not available from the Debian repositories, I'll have to install it from PyPi. So I should put it in its own environment. Can pipx help me with this? -- Chris Green · -- https://mail.python.org/mailman/listinfo/python-list
Re: Tools to help with text mode (i.e. non-GUI) input
On 12/01/25 03:28, Chris Green via Python-list wrote: I'm looking for Python packages that can help with text mode input, i.e. for use with non-GUI programs that one runs from the command prompt in a terminal window running a bash shell or some such. What I'm specifically after is a way to provide a default value that can be accepted or changed easily and also a way to provide a number of different values to choose from. I.e. for the default sort of input one might see:- Colour? red Hitting return would return 'red' to the program but you could also backspace over the 'red' and enter something else. Maybe even better would be that the 'red' disappears as soon as you hit any key other than return. For the select a value type of input I want something like the above but hitting (say) arrow up and arrow down would change the value displayed by the 'Colour?' prompt and hitting return would accept the chosen value. In addition I want the ability to narrow down the list by entering one or more initial characters, so if you enter 'b' at the Colour? prompt the list of values presented would only include colours starting with 'b' (beige, blue, black, etc.) Are there any packages that offer this sort of thing? I'd prefer ones from the Debian repositories but that's not absolutely necessary. It might also be possible/useful to use the mouse for this. There must be more choices/combinations of packages to do this. Maybe a good place to start is the Python Prompt Toolkit (https://python-prompt-toolkit.readthedocs.io/en/master/) -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list