Re: Tools to help with text mode (i.e. non-GUI) input

Liste des GroupesRevenir à cl python 
Sujet : Re: Tools to help with text mode (i.e. non-GUI) input
De : PythonList (at) *nospam* DancesWithMice.info (dn)
Groupes : comp.lang.python
Date : 12. Jan 2025, 01:49:03
Autres entêtes
Organisation : DWM
Message-ID : <mailman.62.1736643524.2912.python-list@python.org>
References : 1 2
User-Agent : Mozilla Thunderbird
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

Date Sujet#  Auteur
11 Jan 25 * Tools to help with text mode (i.e. non-GUI) input7Chris Green
11 Jan 25 +* Re: Tools to help with text mode (i.e. non-GUI) input4Stefan Ram
11 Jan 25 i`* Re: Tools to help with text mode (i.e. non-GUI) input3Stefan Ram
12 Jan 25 i `* Re: Tools to help with text mode (i.e. non-GUI) input2rustbuckett
12 Jan 25 i  `- Re: Tools to help with text mode (i.e. non-GUI) input1Chris Green
12 Jan 25 +- Re: Tools to help with text mode (i.e. non-GUI) input1dn
16 Jan 25 `- Re: Tools to help with text mode (i.e. non-GUI) input1Roel Schroeven

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal