I am new to guizero and Python in general but I'm fighting my way through it and I think I'm almost there.
Essentially, I'm making a barcode comparing app. I'm using guizero to:
-bring up a first pop-up to collect a first scan
-bring up a second pop-up to collect a second scan
-Compare them
-App turns green if they are the same, red if they are not
-Wait a little
-Clear inputs and turn app background gray again
I also have a status message to state what process it is doing
Where I am having issues is that when that sequence is done, I want it to start back at bringing up the first pop-up.
I found the repeat command but it isn't working the way I need. When I use repeat, it runs regardless of where I am in my sequence and just endlessly brings up my first pop-up. If I was writing in C, I would just wrap my command, a wait and app.display() in a while loop but that doesn't apply in Python.
What could I do to repeat my command, without a set amount of time?
Never mind. I don't know if it was the right way but I just did:
Essentially, I'm making a barcode comparing app. I'm using guizero to:
-bring up a first pop-up to collect a first scan
-bring up a second pop-up to collect a second scan
-Compare them
-App turns green if they are the same, red if they are not
-Wait a little
-Clear inputs and turn app background gray again
I also have a status message to state what process it is doing
Where I am having issues is that when that sequence is done, I want it to start back at bringing up the first pop-up.
I found the repeat command but it isn't working the way I need. When I use repeat, it runs regardless of where I am in my sequence and just endlessly brings up my first pop-up. If I was writing in C, I would just wrap my command, a wait and app.display() in a while loop but that doesn't apply in Python.
What could I do to repeat my command, without a set amount of time?
Never mind. I don't know if it was the right way but I just did:
while True: compare() app.update() app.display()This works!