Jason But
2013-01-28 23:26:02 UTC
Hello all
I've been hacking away for the last three days with urwid, my program is
visually organised as follows (with extra stuff but this is the most
important bit)
---------------------------------------------------------------
|listbox widget | terminal widget |
| | |
| | |
| | |
| | |
| | |
| | |
---------------------------------------------------------------
The terminal widget is tied to a callable which executes a series of
external commands (using subprocess.call). The callable also sends progress
information to the main program using a watch_pipe where a handler takes
progress information to update the currently selected item in the listbox. A
summary of the process is that the listbox displays a list of tasks to
execute, which are executed in the terminal window, the selected item is the
listbox is updated to indicate what the current task is.
The problem is this.
1) The program works fine ONLY if the applications executed in the terminal
widget do NOT require any keyboard input.
2) The two widgets above are in a Columns, if O use a "cols.focus_col = 1"
(giving focus to the terminal widget), then all of a sudden any applications
that require keyboard input start working as the terminal is the selected
widget. However, because the listbox has lost focus, the currently selected
item is no longer highlighted
Any ideas on how I can achieve both?
Thanks in advance
Jason
I've been hacking away for the last three days with urwid, my program is
visually organised as follows (with extra stuff but this is the most
important bit)
---------------------------------------------------------------
|listbox widget | terminal widget |
| | |
| | |
| | |
| | |
| | |
| | |
---------------------------------------------------------------
The terminal widget is tied to a callable which executes a series of
external commands (using subprocess.call). The callable also sends progress
information to the main program using a watch_pipe where a handler takes
progress information to update the currently selected item in the listbox. A
summary of the process is that the listbox displays a list of tasks to
execute, which are executed in the terminal window, the selected item is the
listbox is updated to indicate what the current task is.
The problem is this.
1) The program works fine ONLY if the applications executed in the terminal
widget do NOT require any keyboard input.
2) The two widgets above are in a Columns, if O use a "cols.focus_col = 1"
(giving focus to the terminal widget), then all of a sudden any applications
that require keyboard input start working as the terminal is the selected
widget. However, because the listbox has lost focus, the currently selected
item is no longer highlighted
Any ideas on how I can achieve both?
Thanks in advance
Jason