#! /usr/bin/env python
# Time-stamp: <2012-02-26 11:35:34 pallier>

# will display the graphics (*.png) files int the current dir
# waits for a keypress after each image


import glob
from pyepl.locals import *

exp = Experiment()
video = VideoTrack("video")
key = KeyTrack("key")
clk = PresentationClock()

# enable escape
exp.setBreak()

# load all the graphic (png) files in current directory
pictures = []
for f in glob.glob("*.png"):
    pictures.append(Image(f))

video.clear("black")

waitForAnyKey(clk, Text("Press any key to begin"))

for p in pictures:
    video.clear("black")  
    video.showProportional(p, 0.5, 0.5)
    video.updateScreen()
    waitForAnyKey()
    video.clear("black")

video.clear("black")
flashStimulus(Text('Thank you'), duration=2000, clk=clk)

06371c0359867c033ed05aac1297d4710ac7901f
<mask token>

<mask token>
exp.setBreak()
<mask token>
for f in glob.glob('*.png'):
    pictures.append(Image(f))
video.clear('black')
waitForAnyKey(clk, Text('Press any key to begin'))
for p in pictures:
    video.clear('black')
    video.showProportional(p, 0.5, 0.5)
    video.updateScreen()
    waitForAnyKey()
    video.clear('black')
video.clear('black')
flashStimulus(Text('Thank you'), duration=2000, clk=clk)

<mask token>
exp = Experiment()
video = VideoTrack('video')
key = KeyTrack('key')
clk = PresentationClock()
exp.setBreak()
pictures = []
for f in glob.glob('*.png'):
    pictures.append(Image(f))
video.clear('black')
waitForAnyKey(clk, Text('Press any key to begin'))
for p in pictures:
    video.clear('black')
    video.showProportional(p, 0.5, 0.5)
    video.updateScreen()
    waitForAnyKey()
    video.clear('black')
video.clear('black')
flashStimulus(Text('Thank you'), duration=2000, clk=clk)

import glob
from pyepl.locals import *
exp = Experiment()
video = VideoTrack('video')
key = KeyTrack('key')
clk = PresentationClock()
exp.setBreak()
pictures = []
for f in glob.glob('*.png'):
    pictures.append(Image(f))
video.clear('black')
waitForAnyKey(clk, Text('Press any key to begin'))
for p in pictures:
    video.clear('black')
    video.showProportional(p, 0.5, 0.5)
    video.updateScreen()
    waitForAnyKey()
    video.clear('black')
video.clear('black')
flashStimulus(Text('Thank you'), duration=2000, clk=clk)

#! /usr/bin/env python
# Time-stamp: <2012-02-26 11:35:34 pallier>

# will display the graphics (*.png) files int the current dir
# waits for a keypress after each image


import glob
from pyepl.locals import *

exp = Experiment()
video = VideoTrack("video")
key = KeyTrack("key")
clk = PresentationClock()

# enable escape
exp.setBreak()

# load all the graphic (png) files in current directory
pictures = []
for f in glob.glob("*.png"):
    pictures.append(Image(f))

video.clear("black")

waitForAnyKey(clk, Text("Press any key to begin"))

for p in pictures:
    video.clear("black")  
    video.showProportional(p, 0.5, 0.5)
    video.updateScreen()
    waitForAnyKey()
    video.clear("black")

video.clear("black")
flashStimulus(Text('Thank you'), duration=2000, clk=clk)
