def select_file(self):
    try:
        init_dir = self.runner.working_dir
        ftypes = [('All files', '*.*')]
        if ('RasterAndVector' in self.file_type):
            ftypes = [('Shapefiles', '*.shp'), ('Raster files', ('*.dep', '*.tif', '*.tiff', '*.bil', '*.flt', '*.sdat', '*.rdc', '*.asc'))]
        elif ('Raster' in self.file_type):
            ftypes = [('Raster files', ('*.dep', '*.tif', '*.tiff', '*.bil', '*.flt', '*.sdat', '*.rdc', '*.asc'))]
        elif ('Lidar' in self.file_type):
            ftypes = [('LiDAR files', ('*.las', '*.zlidar', '*.laz', '*.zip'))]
        elif ('Vector' in self.file_type):
            ftypes = [('Shapefiles', '*.shp')]
        elif ('Text' in self.file_type):
            ftypes = [('Text files', '*.txt'), ('all files', '*.*')]
        elif ('Csv' in self.file_type):
            ftypes = [('CSC files', '*.csv'), ('all files', '*.*')]
        elif ('Html' in self.file_type):
            ftypes = [('HTML files', '*.html')]
        result = filedialog.askopenfilenames(initialdir=init_dir, title='Select files', filetypes=ftypes)
        if result:
            for v in result:
                self.opt.insert(tk.END, v)
            self.runner.working_dir = os.path.dirname(result[0])
    except:
        messagebox.showinfo('Warning', 'Could not find file')
def select_file(self):
    try:
        init_dir = self.runner.working_dir
        ftypes = [('All files', '*.*')]
        if ('RasterAndVector' in self.file_type):
            ftypes = [('Shapefiles', '*.shp'), ('Raster files', ('*.dep', '*.tif', '*.tiff', '*.bil', '*.flt', '*.sdat', '*.rdc', '*.asc'))]
        elif ('Raster' in self.file_type):
            ftypes = [('Raster files', ('*.dep', '*.tif', '*.tiff', '*.bil', '*.flt', '*.sdat', '*.rdc', '*.asc'))]
        elif ('Lidar' in self.file_type):
            ftypes = [('LiDAR files', ('*.las', '*.zlidar', '*.laz', '*.zip'))]
        elif ('Vector' in self.file_type):
            ftypes = [('Shapefiles', '*.shp')]
        elif ('Text' in self.file_type):
            ftypes = [('Text files', '*.txt'), ('all files', '*.*')]
        elif ('Csv' in self.file_type):
            ftypes = [('CSC files', '*.csv'), ('all files', '*.*')]
        elif ('Html' in self.file_type):
            ftypes = [('HTML files', '*.html')]
        result = filedialog.askopenfilenames(initialdir=init_dir, title='Select files', filetypes=ftypes)
        if result:
            for v in result:
                self.opt.insert(tk.END, v)
            self.runner.working_dir = os.path.dirname(result[0])
    except:
        messagebox.showinfo('Warning', 'Could not find file')