예제 #1
0
	def ejecutar(self, opcion):

		if opcion in self.dictOpciones.keys():
				opcion = self.dictOpciones[opcion]
				try:
					exec(opcion.execs)
				except Exception as inst:
					Interfaz.err(str(inst))
		else:
			self.imprimirOpcionInvalida()
예제 #2
0
	def imprimirOpcionInvalida(self):
		Interfaz.err('Opcion Invalida')
예제 #3
0
	def imprimirError(self,opcion):
		Interfaz.err('hubo un error al ejecutar ' + self.dictOpciones[opcion].descripcion)
예제 #4
0
	def definirPath(self):
		path = raw_input(Interfaz.buildColor('azul','Ingrese el nombre del path del traductor sin espacio en blanco. ejemplo:campus.modulos.aval.form\n'))
		if (path.find(' ') != -1):
			Interfaz.err('Ingresó con espacio')
		else :
			self.path = path