|
import sys
|
|
import subprocess
|
|
import os
|
|
import keyfiledict
|
|
import gspread
|
|
from oauth2client.service_account import ServiceAccountCredentials
|
|
from google.oauth2 import service_account
|
|
|
|
from dotenv import load_dotenv
|
|
|
|
load_dotenv()
|
|
|
|
|
|
subprocess.check_call([sys.executable, "-m", "pip", "install", "--upgrade", "pip"])
|
|
|
|
|
|
if sys.version_info >= (3, 3):
|
|
subprocess.run([sys.executable, "-m", "venv", "venv"])
|
|
else:
|
|
subprocess.run(["python", "-m", "venv", "venv"])
|
|
|
|
|
|
|
|
activate_script = os.path.join("venv", "Scripts", "activate")
|
|
subprocess.run(activate_script, shell=True)
|
|
|
|
subprocess.check_call(["pip", "install", "google-api-python-client"])
|
|
|
|
|
|
subprocess.check_call(["pip", "install", "oauth2client"])
|
|
subprocess.check_call(["pip", "install", "gspread"])
|
|
|
|
|
|
|
|
|
|
client = gspread.authorize(keyfiledict.credentials())
|
|
sheet = client.open('Zapotec Minimal Pairs').sheet1
|
|
|
|
|
|
list_of_data = sheet.get_all_records()
|
|
|
|
|
|
cells = sheet.range('C2:C32')
|
|
for cell in cells:
|
|
print(cell.value)
|
|
|
|
|
|
|