Phil
September 7, 2017, 12:09pm
1
New to PsychoPy hacking, but trying to figure out the graphics side of things work. Searched and searched, but I see no reference to ‘pyglet’ in the code. How is this imported?
Michael
September 7, 2017, 10:56pm
2
This probably happens when you import psychopy.visual
, which in turn will import visual.window
import sys
import os
import weakref
from psychopy.contrib.lazy_import import lazy_import
# Ensure setting pyglet.options['debug_gl'] to False is done prior to any
# other calls to pyglet or pyglet submodules, otherwise it may not get picked
# up by the pyglet GL engine and have no effect.
# Shaders will work but require OpenGL2.0 drivers AND PyOpenGL3.0+
import pyglet
pyglet.options['debug_gl'] = False
GL = pyglet.gl
import ctypes
# try to find avbin (we'll overload pyglet's load_library tool and then
# add some paths)
haveAvbin = False
# on windows try to load avbin now (other libs can interfere)
if sys.platform == 'win32':
1 Like
Phil
September 8, 2017, 8:17am
3
Ah, there it is! Thank you!