# Path: pygaze/settings.py
# class Settings(object):
#     def __init__(self):
#     def read_module(self, mod):
#     def __getattr__(self, setting):
#     def __setattr__(self, setting, value):
# 
# Path: pygaze/screen.py
# class Screen(BaseScreen):
# 
#     """
#     A class for Screen objects, for visual stimuli (to be displayed via a
#     Display object)
#     """
# 
#     def __init__(self, disptype=settings.DISPTYPE, **args):
# 
#         """
#         Initializes the Screen object.
#         
#         Keyword arguments:
#         disptype    --    Type of display: either "pygame" or "psychopy"
#                     (default = DISPTYPE)
#         dispsize    -- size of the display in pixels: a (width, height)
#                    tuple (default = DISPSIZE)
#         fgc        -- the foreground colour: a colour name (e.g. "red") or 
#                    a RGB(A) tuple (e.g. (255,0,0) or (255,0,0,255))
#                    (default = FGC)
#         bgc        -- the background colour: a colour name (e.g. "red") or 
#                    a RGB(A) tuple (e.g. (255,0,0) or (255,0,0,255))
#                    (default = BGC)
#         screennr    -- the screen number: 0, 1 etc. (default =
#                    SCREENNR)
#         mousevisible    -- Boolean indicating mouse visibility (default = 
#                        MOUSEVISIBLE)
#         screen    -- a Screen object to be presented on the new Display
#                    (default=None)
#         """
# 
#         if disptype == "pygame":
#             from pygaze._screen.pygamescreen import PyGameScreen as Screen
#         elif disptype == "psychopy":
#             from pygaze._screen.psychopyscreen import PsychoPyScreen as Screen
#         elif disptype == "opensesame":
#             from pygaze._screen.osscreen import OSScreen as Screen
#         else:
#             raise Exception("Unexpected disptype: {}".format(disptype))
#         self.__class__ = Screen
#         self.__class__.__init__(self, **args)
#         copy_docstr(BaseScreen, Screen)
# 
# Path: pygaze/mouse.py
# class Mouse(BaseMouse):
# 
#     """A mouse for collecting responses"""
# 
#     def __init__(self, disptype=settings.DISPTYPE, **args):
# 
#         """
#         See BaseMouse docstring
#         """
# 
#         if disptype == "pygame":
#             from pygaze._mouse.pygamemouse import PyGameMouse as Mouse
#         elif disptype == "psychopy":
#             from pygaze._mouse.psychopymouse import PsychoPyMouse as Mouse
#         elif disptype == "opensesame":
#             from pygaze._mouse.osmouse import OSMouse as Mouse
#         else:
#             raise Exception("Unexpected disptype: {}".format(disptype))
#         self.__class__ = Mouse
#         self.__class__.__init__(self, **args)
#         copy_docstr(BaseMouse, Mouse)
# 
# Path: pygaze/keyboard.py
# class Keyboard(BaseKeyboard):
# 
#     # see BaseKeyboard
# 
#     def __init__(self, disptype=settings.DISPTYPE, **args):
# 
#         # see BaseKeyboard
# 
#         if disptype == "pygame":
#             from pygaze._keyboard.pygamekeyboard import PyGameKeyboard as \
#                 Keyboard
#         elif disptype == "psychopy":
#             from pygaze._keyboard.psychopykeyboard import PsychoPyKeyboard as \
#                 Keyboard
#         elif disptype == "opensesame":
#             from pygaze._keyboard.oskeyboard import OSKeyboard as \
#                 Keyboard
#         else:
#             raise Exception("Unexpected disptype: %s".format(disptype))
#         self.__class__ = Keyboard
#         self.__class__.__init__(self, **args)
#         copy_docstr(BaseKeyboard, Keyboard)
# 
# Path: pygaze/sound.py
# class Sound(BaseSound):
# 
#     """Sound playback"""
# 
#     def __init__(self, disptype=settings.DISPTYPE, **args):
# 
#         """
#         See BaseSound docstring
#         """
# 
#         if disptype in ("pygame", "psychopy", "opensesame"):
#             from pygaze._sound.pygamesound import PyGameSound as Sound
#         else:
#             raise Exception("Unexpected disptype: {}".format(disptype))
#         self.__class__ = Sound
#         self.__class__.__init__(self, **args)
#         copy_docstr(BaseSound, Sound)


from pygaze import settings
from pygaze.screen import Screen
from pygaze.mouse import Mouse
from pygaze.keyboard import Keyboard
from pygaze.sound import Sound
    from PIL import Image
import pygaze
import os
import sys
import platform
import array
        import Image
import pylink
    import pygame
    import psychopy
import pygame
        import tempfile
        import os
#
# PyGaze is a Python module for easily creating gaze contingent experiments
# or other software (as well as non-gaze contingent experiments/software)
# Copyright (C) 2012-2013 Edwin S. Dalmaijer
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>




# try importing PIL
try:
except:
    try:
    except:
        print("Failed to import PIL.")

custom_display = pylink.EyeLinkCustomDisplay


# Path: pygaze/settings.py
# class Settings(object):
#     def __init__(self):
#     def read_module(self, mod):
#     def __getattr__(self, setting):
#     def __setattr__(self, setting, value):
# 
# Path: pygaze/screen.py
# class Screen(BaseScreen):
# 
#     """
#     A class for Screen objects, for visual stimuli (to be displayed via a
#     Display object)
#     """
# 
#     def __init__(self, disptype=settings.DISPTYPE, **args):
# 
#         """
#         Initializes the Screen object.
#         
#         Keyword arguments:
#         disptype    --    Type of display: either "pygame" or "psychopy"
#                     (default = DISPTYPE)
#         dispsize    -- size of the display in pixels: a (width, height)
#                    tuple (default = DISPSIZE)
#         fgc        -- the foreground colour: a colour name (e.g. "red") or 
#                    a RGB(A) tuple (e.g. (255,0,0) or (255,0,0,255))
#                    (default = FGC)
#         bgc        -- the background colour: a colour name (e.g. "red") or 
#                    a RGB(A) tuple (e.g. (255,0,0) or (255,0,0,255))
#                    (default = BGC)
#         screennr    -- the screen number: 0, 1 etc. (default =
#                    SCREENNR)
#         mousevisible    -- Boolean indicating mouse visibility (default = 
#                        MOUSEVISIBLE)
#         screen    -- a Screen object to be presented on the new Display
#                    (default=None)
#         """
# 
#         if disptype == "pygame":
#             from pygaze._screen.pygamescreen import PyGameScreen as Screen
#         elif disptype == "psychopy":
#             from pygaze._screen.psychopyscreen import PsychoPyScreen as Screen
#         elif disptype == "opensesame":
#             from pygaze._screen.osscreen import OSScreen as Screen
#         else:
#             raise Exception("Unexpected disptype: {}".format(disptype))
#         self.__class__ = Screen
#         self.__class__.__init__(self, **args)
#         copy_docstr(BaseScreen, Screen)
# 
# Path: pygaze/mouse.py
# class Mouse(BaseMouse):
# 
#     """A mouse for collecting responses"""
# 
#     def __init__(self, disptype=settings.DISPTYPE, **args):
# 
#         """
#         See BaseMouse docstring
#         """
# 
#         if disptype == "pygame":
#             from pygaze._mouse.pygamemouse import PyGameMouse as Mouse
#         elif disptype == "psychopy":
#             from pygaze._mouse.psychopymouse import PsychoPyMouse as Mouse
#         elif disptype == "opensesame":
#             from pygaze._mouse.osmouse import OSMouse as Mouse
#         else:
#             raise Exception("Unexpected disptype: {}".format(disptype))
#         self.__class__ = Mouse
#         self.__class__.__init__(self, **args)
#         copy_docstr(BaseMouse, Mouse)
# 
# Path: pygaze/keyboard.py
# class Keyboard(BaseKeyboard):
# 
#     # see BaseKeyboard
# 
#     def __init__(self, disptype=settings.DISPTYPE, **args):
# 
#         # see BaseKeyboard
# 
#         if disptype == "pygame":
#             from pygaze._keyboard.pygamekeyboard import PyGameKeyboard as \
#                 Keyboard
#         elif disptype == "psychopy":
#             from pygaze._keyboard.psychopykeyboard import PsychoPyKeyboard as \
#                 Keyboard
#         elif disptype == "opensesame":
#             from pygaze._keyboard.oskeyboard import OSKeyboard as \
#                 Keyboard
#         else:
#             raise Exception("Unexpected disptype: %s".format(disptype))
#         self.__class__ = Keyboard
#         self.__class__.__init__(self, **args)
#         copy_docstr(BaseKeyboard, Keyboard)
# 
# Path: pygaze/sound.py
# class Sound(BaseSound):
# 
#     """Sound playback"""
# 
#     def __init__(self, disptype=settings.DISPTYPE, **args):
# 
#         """
#         See BaseSound docstring
#         """
# 
#         if disptype in ("pygame", "psychopy", "opensesame"):
#             from pygaze._sound.pygamesound import PyGameSound as Sound
#         else:
#             raise Exception("Unexpected disptype: {}".format(disptype))
#         self.__class__ = Sound
#         self.__class__.__init__(self, **args)
#         copy_docstr(BaseSound, Sound)


# Path: pygaze/_eyetracker/eyelinkgraphics.py
from pygaze import settings
from pygaze.screen import Screen
from pygaze.mouse import Mouse
from pygaze.keyboard import Keyboard
from pygaze.sound import Sound
    from PIL import Image
import pygaze
import os
import sys
import platform
import array
        import Image
import pylink
    import pygame
    import psychopy
import pygame
        import tempfile
        import os

#
# PyGaze is a Python module for easily creating gaze contingent experiments
# or other software (as well as non-gaze contingent experiments/software)
# Copyright (C) 2012-2013 Edwin S. Dalmaijer
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>




# try importing PIL
try:
except:
    try:
    except:
        print("Failed to import PIL.")

custom_display = pylink.EyeLinkCustomDisplay


if settings.DISPTYPE == "pygame":