i'm not too experienced with open cv but if you want the code in the for loop to be called when a key is pressed, you can use a while loop and an raw_input and a condition to prevent the loop from executing forever
import cv2
camera = cv2.VideoCapture(0)
i = 0
while i < 10:
raw_input('Press Enter to capture')
return_value, image = camera.read()
cv2.imwrite('opencv'+str(i)+'.png', image)
i += 1
del(camera)