from psychopy import visual, core, event, sound

# Create the window
screen = visual.Window(size=[800, 600], color='black')

instruction = visual.TextStim(screen, text="Press SPACE to start", color='white')
instruction.draw()
screen.flip()

print("Waiting for space bar...")
event.waitKeys(keyList=['space'])

# ... this is where the main experiment would happen ...

done_text = visual.TextStim(screen, text="Done! Press any key to exit", color='white')
done_text.draw()
screen.flip()
event.waitKeys()

# Clean up
screen.close()
core.quit()