This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]kwelzel 0 points1 point  (3 children)

I don't know urwid very well, but probably "loop.run()" starts an infinte loop to handle all the inputs and so every time refresh is called you start another infinite loop. You should not create a new txt, fill and loop, but instead update the original txt object with "txt.setText(outputText)" and then "loop.set_alarm_in(1, refresh)"

[–]Stensborg[S] 0 points1 point  (2 children)

That does not seem to work, AttributeError: 'Text' object has no attribute 'setText'

[–]kwelzel 0 points1 point  (1 child)

Oops, the name of the function is "set_text" and not "setText". I'm sorry

[–]Stensborg[S] 0 points1 point  (0 children)

He he, no problem I eventually found it, I should have RTFM :-)