def __init__(self, folder, dropboxClient=None): if dropboxClient: dropbox_file_list = dbo.list_folder(dropboxClient, 'Camera Uploads') self.dropboxClient = dropboxClient else: dropbox_file_list = [] fileList = self._getFileList(folder) self.imageList = ImageList(fileList, dropbox_file_list)
__author__ = 'sec' import Comparison.DropboxApiStub as dbapi from Comparison.ImageData import ImageList, ImageData from Dropbox.DropBoxObject import DropBoxObject import Dropbox.DropBoxFuncts as dbo import os #dropbox_file_list = dbapi.getDropboxFilenames() key,secret = dbo.config() client = dbo.connect(key,secret) dropbox_file_list = dbo.list_folder(client, 'Camera Uploads') print dropbox_file_list local_file_list = dbapi.getLocalFilenames() print local_file_list img_list = ImageList(local_file_list, dropbox_file_list) print 'len of img_list', len(img_list) for img in img_list: print img.filename print img.DropboxFilename() print img.IsInDropbox() print img_list.ExistingMonths()