Skip to content

Instantly share code, notes, and snippets.

@emrivero
Created December 15, 2021 18:37
Show Gist options
  • Save emrivero/0f5815a02fe7d2729db417077077c939 to your computer and use it in GitHub Desktop.
Save emrivero/0f5815a02fe7d2729db417077077c939 to your computer and use it in GitHub Desktop.
import os
import pathlib
import shutil
import csv
import json
import urllib.request
# with open("./main.py", mode='r', encoding='utf8') as f:
# for line in f:
# print(line)
# os.rename('', '')
# os.remove
# os.unlink()
# os.path.abspath
# os.path.dirname
# os.path.realpath
# os.getcwd
# shutil.rmtree()
# os.rmdir
# with open('./estaciones.csv', encoding='utf-8') as fichero:
# lector = csv.reader(fichero)
# for registro in lector:
# print(registro)
# with open('./estaciones.csv', encoding='utf-8') as fichero:
# lector = csv.reader(fichero)
# lector = csv.DictReader(fichero)
# next(lector)
# for registro in lector:
# print(registro)
# break
# with urllib.request.urlopen("https://api.citybik.es/v2/networks/sevici") as f:
# sevici_json = f.read()
# estaciones = json.loads(sevici_json)
# for estacion in estaciones['network']['stations']:
# print(estacion['extra']['address'])
# with open('./glosario.json', mode='r', encoding='utf-8') as json_:
# content = json_.read()
# output = json.loads(content)
# print(output)
# with urllib.request.urlopen("https://api.citybik.es/v2/networks/sevici") as f:
# sevici_json = f.read()
# estaciones = json.loads(sevici_json)
# print(estaciones)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment