So I am an inexperienced Python coder, with what I have gathered might be a rather complicated need. I am a cognitive scientist and I need precise stimulus display and butto
If you are running the Python code on Linux machine, make the kernel low latency (preemptive). There is a flag for it when you compile the kernel.
Make sure that other processes running on the machine are minimum so they do not interrupt the kernel.
Assign higher task priority to your Python script.