[Twisted-Python] woven dynamic table cell updating

Justin Johnson justinjohnson at fastmail.fm
Fri Oct 10 09:37:04 EDT 2003


I have some code (attached ui.py) that creates a table displaying results
of running tasks.  The rows are tasks and the columns are step numbers in
that task.  I use this table when I make a bunch of requests into PB
servers running on multiple machines.  As those tasks move forward, the
PB server calls back into the client (which has a perspective_* method)
to update the status of that task/step.  An 'I' appears for 'in
progress', 'S' for 'success', and 'F' for 'failure'.  If there are
failures, I display the details once the entire table is populated and
all tasks are complete.

      | 1 | 2 | 3 | 4 | 5 | status
--------------------------------------
task1 | S | S | S | S | S | success
--------------------------------------
task2 | S | S | I | I | I | in progress
--------------------------------------
task3 | S | S | I | I | I | in progress
--------------------------------------
task4 | S | S | I | I | I | in progress
--------------------------------------
task5 | I | I | I | I | I | in progress
--------------------------------------

In the console based version each time the PB server task calls back into
the client to update the status, it also requests that the client
redisplay the screen.  So the screen redraws quite often.  Does anyone
know how I could do something similar with woven?  My thought was that
this will require LivePage, but I'm not sure.  Anyone have any
thoughts/suggestions?  I've attached (in widgets.py) my first attempt at
porting the results table to woven.

Thank you.
-Justin

P.S.

To run the attached file, you'll need to get the following modules.

WConio: http://newcenturycomputers.net/projects/wconio.html

    Windows Console I/O
    1.5 or later.

anycons: http://newcenturycomputers.net/projects/anycons.html

    Simple Universal Console I/O
    1.1 or later.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ui.py
Type: application/unknown
Size: 4438 bytes
Desc: not available
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20031010/82e653e7/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: widgets.py
Type: application/unknown
Size: 4040 bytes
Desc: not available
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20031010/82e653e7/attachment-0001.bin 


More information about the Twisted-Python mailing list