def __init__(self, folder, dropboxClient=None):
        if dropboxClient:
            dropbox_file_list = dbo.list_folder(dropboxClient, 'Camera Uploads')
            self.dropboxClient = dropboxClient
            dropbox_file_list = []

        fileList = self._getFileList(folder)
        self.imageList = ImageList(fileList, dropbox_file_list)
    def onClick(self, event):
        date = ''
        img = pygame.image.frombuffer(self.mainWindow.display.picture, self.mainWindow.display.size, 'RGB')
        date ="%Y%m%d%H%M%S"), img), '%s.jpeg' % date)

            #print 'failed to capture image at %s' %"%Y%m%d%H%M%S")

        if date:
            #exif stuff
            filename = date + '.jpeg'

            with open(filename, 'rb'):
                jpeg = pexif.JpegFile.fromFile(filename)
                exif = jpeg.get_exif(create=True)
                exif.primary.ExtendedEXIF.DateTimeOriginal = date
                #print os.getcwd() + '\\' + filename
            dbo.upload_file(self.client,filename,'Camera Uploads')
 def onLogin(self, event):
     key,secret = dbo.config()
     self.client = dbo.connect(key,secret)
__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()