136 questions
1
vote
0
answers
16
views
Urwid ListBox size to space available instead of constant
My program is split into 4 sections. One section is a constant-size section of various widgets, and the other 3 are list boxes.
If I set rows to 15, on this screen size, the program will crash. Also, ...
1
vote
0
answers
167
views
Urwid example with input validation per keypress on a datetime entry?
Context
Suppose one would like two, modular, input boxes in which one can enter a date in format yyyy-mm-dd and optionally the time in format: HH-MM, like:
Please enter the date in format YYYY-MM-DD, (...
1
vote
0
answers
101
views
How to update urwid.Text widget dynamically?
I'm working on TUI spotify player with urwid library and can't figure out how to update text with the name of playing track every time track is changed.
I have 2 widgets on the screen. First with ...
-2
votes
1
answer
255
views
I don't know how to use urwid.Button
Hello i'm trying to understand urwid library to make my programs:
I have a problem, when i create a button with: urwid.Button('my button', on_press=function())
or like in the code below:
import urwid
...
0
votes
1
answer
141
views
how to pass the value from checkboxes in single list from Urwid?
Hi everyone I'm new with the urwid. I want to send the values of checkboxes which are selected from checkbox list it will add into the list and send this list to the next page. Here below is my code ...
0
votes
1
answer
182
views
How to listen for a file change in urwid?
I want to remote control a python application which uses urwid for the user interface.
My idea was to create a file, pass it's name as command line argument to the application and whenever I write to ...
0
votes
1
answer
575
views
How to make urwid give more space to a Column than another?
I have an urwid layout like so:
The code for this layout is like so:
import urwid
class DashboardUI:
orders_txt: urwid.widget.Text
def show_or_exit(self, key):
if key in ('q', 'Q'):
...
0
votes
1
answer
527
views
How do I get urwid to render a Text widget nested inside a Filler and a WidgetWrap?
My goal is to wrap Urwid's text widget to create my own custom widget. To do this, I need to wrap the text widget in a Filler widget so I can render it the correct size.
With this example code, I'm ...
0
votes
0
answers
37
views
python urwidtrees deleting a SimpleTree node throws exception
I'm working on an app that will add or remove nodes in a TreeDisplay during runtime by user input. I have encountered an issue where removing a child node will throw an exception and crash the app. ...
1
vote
2
answers
392
views
make child widget get the input keypress with urwid on python
I can make a widget inside another widget, as example an urwid.Frame father could have as body an urwid.Pile widget as child.
In this situation, the father should process some input keys when the ...
0
votes
2
answers
522
views
urwid make text 'autoscrolling' down
i'm currently trying to build a little ui for can bus testing on a raspberry pi.
it's basically very easy built since it only has a main info screen and an input text.
My problem is that i cannot find ...
0
votes
0
answers
213
views
Color pass-through in urwid or curses
I would like to write a wrapper around git log, somewhat similar to gitk but on a terminal.
I thought this should be easy because git log already formats the output, all I need to do is put it in a ...
2
votes
1
answer
480
views
urwid auto completion edit widget or pop_up without focus
I am writing an application in python with urwid.
I need an Edit widget with autocompletion. Haven't seen one in the documentation so I have tried implementing it on my own based on the pop_up example....
1
vote
0
answers
93
views
Urwids Edit Widget not updating when using custom List Walker
I'm trying to use a custom List Walker which manages an infinite number of Edit widgets. Key presses seem to reach Edit widgets successfully, however they don't seem to update in any way. How could I ...
3
votes
1
answer
1k
views
How can I create an asynchronous program with urwid and asyncio?
I want to build a chatroom with aiortc. Frist of all, I want to build a mockup with urwid as cli and asyncio.
The urwid part is already running fine, user input is possible. I know want to run a ...
1
vote
2
answers
1k
views
How to clear console line using `print` function
Premise
I'm trying to basically clear the console line, but not the entire console window without using whitespace, so that I don't have extra characters from what was last printed. For example:
# ...
0
votes
0
answers
65
views
How to catch "naked" modifier keys in urwid?
New to GUI programming and event loops etc. so please bear with me.
Have a look at this small example. My goal is to switch focus on press of the ALT key.
import urwid
class MainWindow(urwid.Frame):...
4
votes
1
answer
1k
views
how to update a Columns widget on urwid
I am starting to use urwid and one of the simple things I want to do is have two columns and being able to update one of the columns to display a different widget
I tried the following code but I ...
3
votes
2
answers
2k
views
How to indicate that a urwid listbox has more items than displayed at the moment?
Is there a way to show a user that a urwid listbox has additional items above / below the dispalyed section?
I'm thinking of something like a scrollbar that gives an idea of the number of entries.
Or ...
1
vote
2
answers
933
views
Does the python library "urwid" contain a widget for reading in dates (datepicker)?
npyscreen has the widgets "DateCombo" and "TitleDateCombo" for picking dates.
Is there anything similar in urwid?
If not, are there any recommended third-party libraries?
Here is an example which ...
2
votes
1
answer
1k
views
Is there an equivalent of a GUI text field in urwid?
I'm wondering if the python libary urwid includes an input option that behaves like a GUI text field.
By this I mean that,
the input option remains editable after the input.
individual fields can ...
1
vote
1
answer
537
views
How to keep an urwid.Edit always in focus?
I have programmed with python+urwid a ircII-like screen, where I have a text flow the entire screen of the terminal, plus an editable text at the bottom as the prompt, to let the user insert commands ...
7
votes
1
answer
7k
views
correct way to extend __init__ in python 3 from parent class
General Question: What is the easiest/"most pythonic" way to initialize a child class exactly as its parent, but adding a single attribute?
My specific question: I'd like to extend an (Urwid) Edit ...
2
votes
1
answer
2k
views
How to keep an input bar a the bottom of the screen urwid
I'm working on a chat program in Python and would like to add some user friendly interface to my client. The fact is that I gave myself the challenge
of using only terminal.
So I found the urwid ...
0
votes
1
answer
890
views
Change focus using keypress
I need to implement a feature with URWID, where if I press a key, say c, the focus should go down to the bottom most point in that page. Here, page is nothing but a ListBox. This 'ListBox' is too long ...