def update_file_layout(self):
		auth_token='S2_xUq0_iNAAAAAAAAAACYNG1zf1GAzKpVWVfmLcZLA-FIiSlGxMvmxBkAtspuWQ'
		client = dropbox.client.DropboxClient(auth_token)
		self.clear_widgets()  
		b=BoxLayout(orientation='vertical')
		file_system = FileSystemLocal()
		root_dir= App.get_running_app().user_data_dir+'/';result_dir=root_dir+'results'
		file_list=file_system.listdir(root_dir)   # this returns a list of files in dir
		if os.path.exists(result_dir):file_list.extend(file_system.listdir(App.get_running_app().user_data_dir+'/'+'results'+'/'))
		file_list=[x for x in file_list if x[-4:]=='.csv']
		b.add_widget(Label(text='Select Files to Upload',bold=True,font_size=sp(25),size_hint_y= 0.1))      
		file_system = FileSystemLocal()
		file_list=file_system.listdir(App.get_running_app().user_data_dir+'/')   # this returns a list of files in dir
		file_list=[x for x in file_list if x[-4:]=='.csv']
		s=ScrollView(size_hint_y=0.75)
		g=GridLayout(cols=2,size_hint_y=None)
		for file_1 in file_list:
			c=CheckBox(active=False)
			l=Label(bold= True,font_size=sp(20),text=file_1,size_hint_y= None,height=70)
			self.check_boxes[c]=file_1
			g.add_widget(l);g.add_widget(c)
		g.bind(minimum_height=g.setter('height'))
		s.add_widget(g)
		b.add_widget(s)
		g_options=GridLayout(cols=2,size_hint_y= 0.1,orientation='horizontal')       
		g_options.add_widget(Button(text="Send",on_press=self.upload,font_size=sp(25)))
		g_options.add_widget(Button(text="Back",on_press=self.return_back,font_size=sp(25)))
		b.add_widget(g_options)
		self.add_widget(b)
 def findFile(self):
     if self.root.ids["ViewPreProcess"].ids["Explorer"].ids["icon_view_tab"].show_hidden:
         path = self.root.ids["ViewPreProcess"].ids["Explorer"].ids["list_view_tab"].path
     else:
         path = self.root.ids["ViewPreProcess"].ids["Explorer"].ids["icon_view_tab"].path
     file_system = FileSystemLocal()
     print "Path : " + str(path)
     for i in file_system.listdir(path):
         if re.search(".CR2",i):
             print "I : " + str(i)
             filename = []
             filename.append(i)
             self.update_list_data(path,filename)
	def update_file_layout(self):
		self.clear_widgets()  
		self.check_boxes={}
		b=BoxLayout(orientation='vertical')
		file_system = FileSystemLocal()
		file_list=file_system.listdir(App.get_running_app().user_data_dir+'/')   # this returns a list of files in dir
		file_list=[x for x in file_list if x[-4:]=='.csv']
		b.add_widget(Label(text='Select files to be deleted',bold=True,font_size=sp(25),size_hint_y= 0.1))
		s=ScrollView(size_hint_y=0.75)
		g=GridLayout(cols=2,size_hint_y=None)
		for file_1 in file_list:
			c=CheckBox()
			l=Label(bold= True,font_size=sp(20),text=file_1,size_hint_y= None,height=70)
			self.check_boxes[c]=file_1
			g.add_widget(l);g.add_widget(c)
		g.bind(minimum_height=g.setter('height'))
		s.add_widget(g)
		b.add_widget(s)
		g_options=GridLayout(cols=2,size_hint_y= 0.10)
		g_options.add_widget(Button(text="Delete",on_press=self.create_result,font_size=sp(25)))
		g_options.add_widget(Button(text="Back",on_press=self.return_back,font_size=sp(25)))
		b.add_widget(g_options)
		self.add_widget(b)        
	def select_experiment(self):
		file_system = FileSystemLocal()
		file_list=file_system.listdir(App.get_running_app().user_data_dir+'/')   # this returns a list of files in dir
		file_list=[x for x in file_list if x[-4:]=='.csv']
		if len(file_list)>0:
			box = BoxLayout(orientation= 'vertical')
			s=ScrollView(size_hint_y=0.80)
			g=GridLayout(cols=1,size_hint_y=None)
			for exp_file in file_list:
				g.add_widget(ToggleButton(text=exp_file, group='experiment',size_hint_y= None,height=90))
			g.bind(minimum_height=g.setter('height'))
			s.add_widget(g)
			box.add_widget(s)
			close_button=Button(text='Ok',size_hint=(.25,.15),pos_hint={'right': (0.75+0.5)/2})
			box.add_widget(close_button)
			close_button.bind(on_release=self.file_button_clicked)
			self.select_exp=Popup(title='Select Experiment',content=box,size_hint=(.75,.75),auto_dismiss=True)
			self.select_exp.open()
		else:
			error_popup=Popup(title='Error',content=Label(text="Please create a experiment before.")\
					,size_hint=(.80,.40),auto_dismiss=True)
			error_popup.open()
			Clock.schedule_interval(error_popup.dismiss, 3)