Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #197189

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

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Grant Edwards <grant.b.edwards@gmail.com>
Newsgroups comp.lang.python
Subject Re: Tools to help with text mode (i.e. non-GUI) input
Date Tue, 14 Jan 2025 19:54:09 -0500 (EST)
Lines 30
Message-ID <mailman.79.1736902451.2912.python-list@python.org> (permalink)
References <2113dab2-59ba-408e-b34a-78722d525f8c@yahoo.co.uk> <3ab7002b-689d-4609-96d7-bb388513f227@yahoo.co.uk> <4YX8tK2xv4znb1c@mail.python.org> <0c3821d3-78c1-45c0-81da-81f9fb4c4f02@yahoo.co.uk> <mailman.70.1736844978.2912.python-list@python.org> <lhmh5l-rhnv.ln1@q957.zbmc.eu> <4YXnZ9475vznWGk@mail.python.org>
X-Trace news.uni-berlin.de RtEQDVEotz+j6spmASLIOABc1UPUC1nDc5GtT6Slb7IQ==
Cancel-Lock sha1:LQzCLBbHRZm3n7/K8D8IkRqmNKQ= sha256:E0SsqJnRyLM5fyfnsC1oeAzbEKMtSmVrAZz/DGFb5bc=
Return-Path <grant.b.edwards@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
Authentication-Results mail.python.org; dkim=none reason="no signature"; dkim-adsp=none (unprotected policy); dkim-atps=neutral
X-Spam-Status OK 0.016
X-Spam-Evidence '*H*': 0.97; '*S*': 0.00; 'gui': 0.05; 'processor': 0.09; 'rendering': 0.09; 'subject:GUI': 0.09; 'terminal': 0.09; 'widgets': 0.09; 'window.': 0.09; 'from:addr:grant.b.edwards': 0.16; 'from:name:grant edwards': 0.16; 'gtk': 0.16; 'gui.': 0.16; 'low-level': 0.16; 'step.': 0.16; 'widgets.': 0.16; 'wrote:': 0.16; 'python': 0.16; 'grant': 0.17; 'instead': 0.17; 'gnu': 0.19; 'to:addr:python-list': 0.20; 'all,': 0.20; 'input': 0.21; 'written': 0.22; 'maybe': 0.22; 'command': 0.23; 'run': 0.23; 'code': 0.23; 'stuff': 0.25; 'configure': 0.26; 'library': 0.26; 'project.': 0.27; 'chris': 0.28; 'output': 0.28; 'header:User- Agent:1': 0.30; 'code,': 0.31; 'program,': 0.31; '(as': 0.32; 'python-list': 0.32; 'window': 0.32; 'same': 0.34; 'from:addr:gmail.com': 0.34; 'trying': 0.35; 'yes,': 0.35; 'source': 0.36; 'way': 0.38; 'thanks': 0.39; 'use': 0.39; "that's": 0.39; 'enough': 0.39; 'handle': 0.39; 'want': 0.40; 'lower': 0.62; 'involved': 0.63; 'everything': 0.63; 'your': 0.64; 'top': 0.65; 'well': 0.65; 'choose': 0.68; 'message-id:invalid': 0.69; 'little': 0.73; 'subject:. ': 0.73; 'remarkably': 0.84; 'subject:Tools': 0.84; 'subject:input': 0.84; 'subject:text': 0.84; 'screen,': 0.93; 'green': 0.96
User-Agent slrn/1.0.3 (Linux)
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.39
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <https://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID <4YXnZ9475vznWGk@mail.python.org>
X-Mailman-Original-References <2113dab2-59ba-408e-b34a-78722d525f8c@yahoo.co.uk> <3ab7002b-689d-4609-96d7-bb388513f227@yahoo.co.uk> <4YX8tK2xv4znb1c@mail.python.org> <0c3821d3-78c1-45c0-81da-81f9fb4c4f02@yahoo.co.uk> <mailman.70.1736844978.2912.python-list@python.org> <lhmh5l-rhnv.ln1@q957.zbmc.eu>
Xref csiph.com comp.lang.python:197189

Show key headers only | View raw


On 2025-01-14, Chris Green via Python-list <python-list@python.org> wrote:

> Yes, thanks all, maybe just straightforward curses is the way to go.
> Looking at some of the 'cleverer' ones they end up looking remarkably
> like GUI code, in which case I might as well use a GUI.

The source code to configure and handle a UI with a certain set of
input widgets is going to be pretty much the same regardless of the
low-level screen bashing details involved in rendering the widgets.

You choose a TUI toolkit like curses panel/menu/forms instead of a GUI
toolkit like gtk because you need your app to run on a terminal
instead of on a X11/wayland screen, not because you want your app to
be simpler than the code for a GUI app (as you've seen, it isn't).

> I have written a (fairly simple) Gtk based python program, I was
> just trying to avoid all the GUI overheads for a little new project.

If you want to avoid the [TG]UI overhead, then command line options
are your friend. If that's not sophisticated enough the gnu "readline"
library with a simple command processor is a common next step.

Or you can use curses to print some help stuff at the top of the
terminal window and then do everything based on single-stroke "command
keys" that print output in the lower part of the terminal window.

--
Grant

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Re: Tools to help with text mode (i.e. non-GUI) input Alan Gauld <learn2program@gmail.com> - 2025-01-14 08:56 +0000
  Re: Tools to help with text mode (i.e. non-GUI) input Chris Green <cl@isbd.net> - 2025-01-14 09:15 +0000
    Re: Tools to help with text mode (i.e. non-GUI) input Grant Edwards <grant.b.edwards@gmail.com> - 2025-01-14 19:54 -0500
    Re: Tools to help with text mode (i.e. non-GUI) input Alan Gauld <learn2program@gmail.com> - 2025-01-16 01:06 +0000

csiph-web