Hi there

I've got a queue (multiprocessing.queue) that is fed by subprocesses and is
consisting of entries like ("server01", "unpacking /tmp/my.tar.gz"). I want
to read from the queue and put the server/message couple into urwid via
Columns, like this:

from urwid.curses_display import Screen

columns = urwid.Columns(listboxes)
screen = Screen()
screen.start()
while is_alive(processes):
    if not display_queue.empty():
        server, message = display_queue.get()
        add_to_listbox(server, listboxes)
        screen.draw_screen((cols,rows), columns)
    else:
        time.sleep(0.05)
screen.stop()

I've got 2 questions:

1. what do I need to put into (cols, rows) in the draw_screen call?

2. am I completely on the wrong track? What would be a better solution to
"be in control myself" because I
a) want to quit the drawing whenever all the subprocesses finished
b) need to periodically check if there are new messages in the queue?

Greets
Philipp
_______________________________________________
Urwid mailing list
[email protected]
http://lists.excess.org/mailman/listinfo/urwid

Reply via email to