jueves- ficheros
This commit is contained in:
parent
f746bea003
commit
9a9583f3f9
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
Este es un ejemplo de texto.
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,4 @@
|
|||
def guardar_texto_en_fichero(texto, nombre_fichero):
|
||||
with open(nombre_fichero, 'w', encoding='utf-8') as archivo:
|
||||
archivo.write(texto)
|
||||
|
5
main.py
5
main.py
|
@ -1,3 +1,4 @@
|
|||
from ficheros import persistenciaFile
|
||||
from bbdd import guardar
|
||||
from scraping.busca import MiScraping
|
||||
|
||||
|
@ -11,3 +12,7 @@ if __name__ == "__main__":
|
|||
links = MiObjScraping.get_links()
|
||||
for link in links:
|
||||
print(link)
|
||||
|
||||
texto = "Este es un ejemplo de texto."
|
||||
nombre_fichero = "ejemplo.txt"
|
||||
persistenciaFile.guardar_texto_en_fichero(texto, nombre_fichero)
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue