def import_map(self): filepath = tk.filedialog.askopenfilenames(title='Import shapefile') if not filepath: return else: self.filepath ,= filepath self.draw_map()