1.pocket API
The Pocket new API does not allow you to send a username and password directly, so you need to apply for the app's Consumer_key, then Get_request_token, get a request_token, and then Consumer_ Key and Request_token use a browser to access the authorize website, then manually click Authorize and then return to Access_token. In the future, the use of Consumer_key and Access_token in the application can be used to the operation of the account (add, delete).
It's very well implemented in Python.
2.python type judgment
Isinstance ([1,2,3,4], list)
3. Write Unicode to file
Import codecsf = codecs.open ('out.txt'a' Utf-8')f.write (U' text ')f.close ()
4.raise
Try : if ... ... .. Else : Raise # raise must be an object derived from exception () or error () except : ... .. Else : ... .. finally : ...
BnkR. @ Www.cnblogs.com/bnkr
Write some of Python's pits: Pocket API, type judgment, Unicode write file, raise