Proyecto

General

Perfil

« Anterior | Siguiente » 

Revisión 74

Ignoramos mayusculas/minusculas en nombres de archivos de rayuela

Ver diferencias:

wifi-ltsp/trunk/transformaArchivos.py
return 8
#Limpiemos las listas de archivos
archivosRayuela = [ archivo for archivo in archivosRayuela if archivo in ["Lunes.txt","Martes.txt","Miercoles.txt","Jueves.txt","Viernes.txt"]]
#Tengamos en cuenta que los archivos entregados por rayuela pueden contener distinto patron en mayusculas y minusculas
dicArchivosRayuela = {"lunes.txt":"","martes.txt":"","miercoles.txt":"","jueves.txt":"","viernes.txt":""}
for archivoRayuela in archivosRayuela:
if archivoRayuela.lower() in dicArchivosRayuela.keys():
dicArchivosRayuela[archivoRayuela.lower()] = archivoRayuela
archivosYaml = [ archivo for archivo in archivosYaml if archivo[-5:] == ".yaml"]
#print archivosRayuela
#print archivosYaml
......
alumnos = {}
macs = {}
#Procesemos cada archivo de Rayuela
for archivoRayuela in archivosRayuela:
for archivoRayuela in dicArchivosRayuela.keys():
if debug:
print "Procesando archivo",os.path.join(datosrayuela,archivoRayuela)
filearchivoRayuela = open(os.path.join(datosrayuela,archivoRayuela), 'r')
archivoServidor = os.path.join(datosservidor,archivoRayuela.lower())
print "Procesando archivo",os.path.join(datosrayuela,dicArchivosRayuela[archivoRayuela])
filearchivoRayuela = open(os.path.join(datosrayuela,dicArchivosRayuela[archivoRayuela]), 'r')
archivoServidor = os.path.join(datosservidor,archivoRayuela)
if debug:
print "Generando archivo",archivoServidor
filearchivoServidor = open(archivoServidor, 'w')

Exportar a: Unified diff