[Urwid] EPICS in urwid

Krempasky Juraj juraj.krempasky at psi.ch
Wed Jul 14 10:08:18 EDT 2010


I am newbie to urwid and I am looking for a solution to integrate urwid
ui into EPICS large scale instrumentation control. 

In the simplest case the point is to make
urwid.AttrMap(urwid.Text(value)) update from EPICS callback mechanisms
that understand the alarm state and value to be changed in ui. First
question I have is that one could access the text and its color
attributes via AttrMap base_widget. Is there some other solution? 

Second question: building up the ui as
Frame->ListBox->(Columns,Pile,Text) is pretty straightforward. However,
is there some way to insert into the
Frame->ListBox->(Columns,Pile,Text) ui configuration also the EPICS
callback mechanism such that the urwid.MainLoop will not complain?

In principle I need to create an object like

class epicsText(epics, urwid.Text):
    def __init__(self, epicsChannel):
           self.search_and_connect(epicsChannel, self.connectCB)

    def connectCB(self,...)

    def valueCB(self,...):
           ...set text attributes

directly in Frame->ListBox->(Columns,Pile,EpicsText) such that the
listbox would initialize the EPICS part correctly and urwid.MainLoop
will stay happy. 

Looking forward for suggestions, best regards.

Juraj Krempasky

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.excess.org/pipermail/urwid/attachments/20100714/afce3faa/attachment-0001.htm 

More information about the Urwid mailing list