Created
February 11, 2020 17:01
-
-
Save parzibyte/a9849144dd6bd6b30461e35a2ad7c684 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
comentarios_archivo_actual = comentarios[argumentos.extension] | |
directorio = argumentos.directorio_archivos | |
os.chdir(directorio) | |
for nombre_archivo in glob.glob("*."+argumentos.extension): | |
ruta = directorio+"/"+nombre_archivo | |
with open(ruta, "r") as archivo: | |
contenido = comentarios_archivo_actual["inicio"] + "\n" + \ | |
creditos + \ | |
comentarios_archivo_actual["fin"] + "\n" + archivo.read() | |
with open(ruta, "w") as archivo: | |
archivo.write(contenido) | |
print("Agregados créditos a {}".format(ruta)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment