Ver Mensaje Individual
  #1 (permalink)  
Antiguo 24/11/2013, 08:09
roberkas98
 
Fecha de Ingreso: noviembre-2013
Mensajes: 61
Antigüedad: 10 años, 5 meses
Puntos: 0
Repetir función-python

Buenas,estoy escribiendo un programa muy sencillo que me pregunta que quiero hacer al encender el equipo y elijo la opcion que quiero y me habre el programa.El caso esque quiero que al elegir una opcion no se me cierre el programa sino que me vuelva a preguntar.Como lo podría hacer?
Código:
Cita:
#!/usr/bin/env python
# Este archivo usa el encoding: utf-8
import os
print "¿Que te apetece hacer?"
print "1 = Jugar"
print "2 = Internet"
jugar = 1
internet = 2
todas = (1,2)#Están todas las funciones(jugar,internet...)
apetecible=int(raw_input ())#Hay que elegir entre las opciones
if apetecible in todas:
if apetecible == jugar:
os.system(r'"C:\Program Files (x86)\Skype\Phone\Skype.exe"')
elif apetecible == internet:
os.system(r'"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"')
else:
print "Elije una opcion de la lista"