Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Create a real-time interactive TUI using Python.

469 views
Skip to first unread message

hongy...@gmail.com

unread,
Aug 31, 2021, 9:12:53 AM8/31/21
to
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

Chris Angelico

unread,
Aug 31, 2021, 12:49:51 PM8/31/21
to
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.

ChrisA

hongy...@gmail.com

unread,
Aug 31, 2021, 8:35:49 PM8/31/21
to

Dennis Lee Bieber

unread,
Aug 31, 2021, 10:06:46 PM8/31/21
to
On Tue, 31 Aug 2021 06:12:42 -0700 (PDT), "hongy...@gmail.com"
<hongy...@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
wlf...@ix.netcom.com http://wlfraed.microdiversity.freeddns.org/

Christian Gollwitzer

unread,
Sep 1, 2021, 12:51:04 AM9/1/21
to
Am 31.08.21 um 18:49 schrieb Chris Angelico:
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

Gisle Vanem

unread,
Sep 1, 2021, 4:19:17 AM9/1/21
to
0 new messages