Advertisement
smathot

Copy problem in Expyriment

Oct 20th, 2012
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.75 KB | None | 0 0
  1. # This script will not show text, but a filled white square where the text
  2. # should be. The problem appears to be that preloaded stimuli cannot be
  3. # copied. The following steps will reliably reproduce the problem across all
  4. # tested configurations.
  5. #
  6. # - Create a fullscreen OpenGL window
  7. # - Preload a stimulus
  8. # - Copy the (same) stimulus
  9.  
  10. from expyriment import control, stimuli
  11. import time
  12. control.defaults.initialize_delay = 0
  13. control.defaults.open_gl = True
  14. exp = control.initialize() 
  15. c = stimuli.Canvas(exp.screen.size)
  16. t = stimuli.TextLine('Some text!')
  17.  
  18. # Disabling either preload() or copy(), or reversing the order will make the
  19. # script work as expected again.
  20. t.preload()
  21. t2 = t.copy()
  22.  
  23. t.present()
  24. time.sleep(1)
  25. control.end()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement