發生此錯誤error setting certificate verify locations
打開CMD
鍵入
git config --global http.sslverify "false"
搞定
一個簡單的網誌,能夠紀錄我所想到的,我所學到的
import gspread
import time #待會會取時間
from oauth2client.service_account import ServiceAccountCredentials
auth_json_path = 'auth.json' #由剛剛建立出的憑證,放置相同目錄以供引入
gss_scopes = ['https://spreadsheets.google.com/feeds'] #我們想要取用的範圍
gss_client = auth_gss_client(auth_json_path, gss_scopes) #呼叫我們的函式
def auth_gss_client(path, scopes):
credentials = ServiceAccountCredentials.from_json_keyfile_name(path, scopes)
return gspread.authorize(credentials)
#從剛剛建立的sheet,把網址中 https://docs.google.com/spreadsheets/d/〔key〕/edit 的 〔key〕的值代入
spreadsheet_key_path = '〔key〕'
#我們透過open_by_key這個method來開啟sheet
sheet = gss_client.open_by_key(spreadsheet_key_path).sheet1
#單純取出時間稍後塞入sheet
today = time.strftime("%c")
#透過insert_row寫入值 第二行塞入時間,abc,123的值
sheet.insert_row([today,"abc", 123], 2)
import oauth2client
print (oauth2client.__version__)
android:parentActivityName="com.example.myfirstapp.MainActivity"
<activity android:name="com.example.myfirstapp.AboutActivity" android:label="@string/title_activity_display_message" android:parentActivityName="com.example.myfirstapp.MainActivity" > <!-- Parent activity meta-data to support 4.0 and lower --> <meta-data android:name="android.support.PARENT_ACTIVITY" android:value="com.example.myfirstapp.MainActivity" /> </activity>