i think doing python statements inside screens are quite unstable, not really sure on why, but I observed that most of the times. so I tend to avoid doing any python statements if I can, such as setting a variable if condition is met, etc.
you can try to prove that by doing a print statement inside the screen... and after the screen shows up try hitting shift + o to see the console to see the printed message.
Code: Select all
screen sample:
$ print("this should be printed only once right?")
I bet that the code above will make the statement be printed more than once and not only once in the console.
and that's what I mean by unstable.
also note that you don't need to use while loop at all, you can use normal for loop inside screens. but yeah, for while loops you really need a python: statement for that.
Code: Select all
screen sample:
vbox:
for i in range(100):
text "text-{}".format(i + 1)