Sep-08-2018, 10:51 AM
Thank you for your reply.
The suggested works perfectly, but unfortunately it does not fully resolve my problem. I need the click to be within the while loop.
I have a while loop that runs by reading records (time and data) from a file. In normal mode ('auto') I want it to run until file ends, with the option to run each record by mouse click.
Here is a simplified snippet of what I actually need, and am unsuccessful in achieving.
The suggested works perfectly, but unfortunately it does not fully resolve my problem. I need the click to be within the while loop.
I have a while loop that runs by reading records (time and data) from a file. In normal mode ('auto') I want it to run until file ends, with the option to run each record by mouse click.
Here is a simplified snippet of what I actually need, and am unsuccessful in achieving.
class Convert(): def __init__(self): while dataCounter < 100: if auto == 0: runTime = 0 # runTime = 0 will hold the next if and while loops and will wait for mouse click if runTime >= dataTime or MOUSE_CLICK: do something................(sending data by I2C to a slave). dataCounter += 1