#NEWLINE# @ token . setter #NEWLINE# def token( self , token ) : #NEWLINE# #INDENT# 'Cache a token for later use.' #NEWLINE# assert isinstance ( token , FlickrAccessToken ) #NEWLINE# self . RAM_CACHE [ ( self . api_key , self . lookup_key ) ] = token #NEWLINE# db = sqlite3 . connect ( self . filename ) #NEWLINE# curs = db . cursor ( ) #NEWLINE# curs . execute ( 'INSERT OR REPLACE INTO oauth_tokens\n                     (api_key, lookup_key, oauth_token, oauth_token_secret,\n                     access_level, fullname, username, user_nsid)\n                     values (?, ?, ?, ?, ?, ?, ?, ?)' , ( self . api_key , self . lookup_key , curs . token , token . token_secret , token . access_level , token . fullname , token . username , token . user_nsid ) ) #NEWLINE# db . commit ( )