esdalmaijer / PyGaze

an open-source, cross-platform toolbox for minimal-effort programming of eye tracking experiments
www.pygaze.org
GNU General Public License v3.0
671 stars 211 forks source link

Prepare for OpenSesame 3, and implement settings module, etc. #38

Closed smathot closed 8 years ago

smathot commented 8 years ago

This pull request contains a few big changes

Settings

First, as we discussed in #13, I implemented a pygaze.settings module. This takes the default settings from pygaze.defaults and overwrites these with settings from constants.py, if it exists.

The main benefit of this module is that it avoids copying the settings as global variables across all the other modules, which made it very difficult to change the settings programmatically. It also looks cleaner, I think.

Behavior-wise it's similar to how it was.

OpenSesame 3.0

I updated the plug-ins for OpenSesame 3.0.

Various other things

I fixed some minor other things, and added a py3compat module to start working on Python 3 compatibility.

Testing

Basic things appear to work fine. I have mostly tested the two dummy eye trackers and the eyetribe, and I plan to test the EyeLink soon. I do not have access to the other trackers; however, I have changed their respective modules to work with the new settings system, so they should be tested as well.

Let me know what you think!

esdalmaijer commented 8 years ago

This is brilliant, thanks! Will have a better look next week, including SMI tests. Will try to hunt down a Tobii too. Let me know if you've managed to test on an EyeLink; if not, I'll use ours.

smathot commented 8 years ago

I have tested it quite a bit on the EyeLink and EyeTribe, from within OpenSesame. This seems to work pretty well, aside from the issues that were already open.

Do you think it is feasible to maintain decent SMI and Tobii support? If not, we could also decide to cut our losses and clearly mark support for these as 'experimental'.