I am developing a kivy application and for file uploads i would like to use the windows default file browser, and not the ones offered by kivy (https://kivy.org/doc/stable/api-kivy.uix.filechooser.html). Do you know if that is even possible? I haven't found anything around. Thanks.
The functions that are actually working with kivy default file browser is the following:
def show_load(self):
content = LoadDialog(load=self.load_file,cancel=self.dismiss_popup)
self._popup = Popup(
title='Load file', content=content, size_hint=(0.9, 0.9)
)
self._popup.open()
def load_file(self, path, filename):
self.filename = filename
full_path = os.path.join(path, filename[0])
filename = os.path.basename(full_path)
app = App.get_running_app()
self.check_input(full_path)
self.dismiss_popup()
def check_input(self, filepath):
'''Auxiliary method for checking user input.
'''
data_df = load_dataframe(filepath, self.ftypes, sep=';')
if not isinstance(data_df, pd.DataFrame) and data_df == -999:
self.warning_popup(message='File format not accepted')
elif data_df.empty:
self.warning_popup(message='Empty file')
# If everything is OK
else:
self.data_df = data_df
self.filepath = filepath