Mailing List Archive

Create a real-time interactive TUI using Python.
I want to know whether python can be used to create real-time interactive TUI, as hstr [1] does.

[1] https://github.com/dvorka/hstr

Regards,
HY
--
https://mail.python.org/mailman/listinfo/python-list
Re: Create a real-time interactive TUI using Python. [ In reply to ]
On Wed, Sep 1, 2021 at 1:59 AM hongy...@gmail.com <hongyi.zhao@gmail.com> wrote:
>
> I want to know whether python can be used to create real-time interactive TUI, as hstr [1] does.
>
> [1] https://github.com/dvorka/hstr
>

Yes.

ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
Re: Create a real-time interactive TUI using Python. [ In reply to ]
On Tue, 31 Aug 2021 06:12:42 -0700 (PDT), "hongy...@gmail.com"
<hongyi.zhao@gmail.com> declaimed the following:

>I want to know whether python can be used to create real-time interactive TUI, as hstr [1] does.
>

Most of these utilities appear to rely upon embedding commands into the
OS SHELL prompt. You could embed pretty much anything to be run as part of
the prompt display.
https://github.com/dvorka/hstr/blob/master/CONFIGURATION.md#bash-history-settings

Since source for HSTR is available, nothing prevents you from recoding
everything in Python -- though I'm fairly certain Python may be a bit
slower unless you can take advantage of compiled C libraries (regex,
perhaps). Based upon the animated GIF, you'll have to master the curses
library from Python.


--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com http://wlfraed.microdiversity.freeddns.org/

--
https://mail.python.org/mailman/listinfo/python-list
Re: Create a real-time interactive TUI using Python. [ In reply to ]
On Wednesday, September 1, 2021 at 12:49:51 AM UTC+8, Chris Angelico wrote:
> On Wed, Sep 1, 2021 at 1:59 AM hongy...@gmail.com <hongy...@gmail.com> wrote:
> >
> > I want to know whether python can be used to create real-time interactive TUI, as hstr [1] does.
> >
> > [1] https://github.com/dvorka/hstr
> >
> Yes.

The following are some python TUI framework libraries/projects I have discovered so far:

https://github.com/pfalcon/picotui
https://github.com/peterbrittain/asciimatics
https://github.com/bczsalba/pytermgui
https://github.com/GeorgeFilipkin/pulsemixer
https://github.com/jwlodek/py_cui
https://github.com/saulpw/visidata
https://github.com/willmcgugan/textual
https://github.com/urwid/urwid

HY
--
https://mail.python.org/mailman/listinfo/python-list
Re: Create a real-time interactive TUI using Python. [ In reply to ]
Am 31.08.21 um 18:49 schrieb Chris Angelico:
> On Wed, Sep 1, 2021 at 1:59 AM hongy...@gmail.com <hongyi.zhao@gmail.com> wrote:
>>
>> I want to know whether python can be used to create real-time interactive TUI, as hstr [1] does.
>>
>> [1] https://github.com/dvorka/hstr
>>
>
> Yes.

I think he also would like to know, how to achieve this ;)

This kind of interface is usually done with the "curses"-library. There
is a Python version of it, see e.g. here

https://docs.python.org/3/howto/curses.html


Christian
--
https://mail.python.org/mailman/listinfo/python-list
Re: Create a real-time interactive TUI using Python. [ In reply to ]