When developing an experiment, I noticed that I can't overload the get_events()-method of the Trial-class, without repeating the logging part etc entirely: If you use super().get_events(), that method flushes the event buffer using psychopy.events.getKeys(), which means I can't access the events/keys that were pressed.
I propose that we let Trial.get_events() also return events, so that overloaded methods can act on it, without repeating/rewriting the logging part. So you could do:
My Trial(...):
def get_events():
events = super().get_events()
if 'y' in events:
print("yo")
When developing an experiment, I noticed that I can't overload the
get_events()
-method of theTrial
-class, without repeating the logging part etc entirely: If you usesuper().get_events()
, that method flushes the event buffer usingpsychopy.events.getKeys()
, which means I can't access theevents
/keys that were pressed.I propose that we let
Trial.get_events()
also returnevents
, so that overloaded methods can act on it, without repeating/rewriting the logging part. So you could do:And still everything get logged.
Any ideas?