I have a Python script which carries out a for loop which runs modules used to carry out a scientific experiment measuring different physical phenomena. I would like to create a keyboard sequence recognized by my program which will continue the for loop (skip the current measurement) and start the next sequence of measurements.
measurement = EXPERIMENT()
for m in measurement:
SciExpMeasure(value1,value2, value3)
I would like for a user to be able to enter some keyboard sequence (e.g. 'Ctrl+n') such that
measurement = EXPERIMENT()
for m in measurement:
if keyboardSequence: continue
SciExpMeasure(value1, value2, value3)
The idea if for a user monitoring the data acquisition to be able to skip a bad measurement and continue to the next one. I've looked into 'press any key to continue' examples and don't think that those options will work for me in this application since they seem to WAIT for 'any to to be pressed' before continuing.
Thanks in advance.