def save_layout_as(self): name = tk.filedialog.asksaveasfilename(parent=app, initialdir=os.getcwd() + files.LAYOUT_PATH, title="Save layout as...", filetypes=layout_filetypes) if name: if files.LAYOUT_EXT not in name: name += files.LAYOUT_EXT files.save_layout(name, False) files.load_layout(name, False)
def save_layout(self): if files.curr_layout == None: self.save_layout_as() else: files.save_layout(files.curr_layout, False)