[Users] [Python] Text of buffer only updated once
Christoph Klassen
christoph.klassen at intevation.de
Wed Apr 6 06:00:32 UTC 2022
Hello,
I'm playing with the Python plugin to test what I can do with it. I
just wanted to try to change the message text in the compose window a
few times with a single script. You can see the script below. I
expected that CM would show the "1" and then the "2" after the sleep
method. But the result was that I could only see the "2" after the
script was finished.
Is there a way to make multiple changes to the buffer (and the UI in
general) multiple times or wasn't that the intention of the python
plugin?
===
import time
cw = clawsmail.compose_window
buffer = cw.text.get_property('buffer')
buffer.set_property('text', '1')
time.sleep(2)
buffer.set_property('text', '2')
===
Greetings,
Christoph
More information about the Users
mailing list