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)
|
||||||
|
|
7
main.py
7
main.py
|
@ -1,3 +1,4 @@
|
||||||
|
from ficheros import persistenciaFile
|
||||||
from bbdd import guardar
|
from bbdd import guardar
|
||||||
from scraping.busca import MiScraping
|
from scraping.busca import MiScraping
|
||||||
|
|
||||||
|
@ -10,4 +11,8 @@ if __name__ == "__main__":
|
||||||
MiObjScraping.join()
|
MiObjScraping.join()
|
||||||
links = MiObjScraping.get_links()
|
links = MiObjScraping.get_links()
|
||||||
for link in links:
|
for link in links:
|
||||||
print(link)
|
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