def replace_file(self):
old_file = self.widget_tree.item(self.widget_tree.focus())["tags"][0]
file = filedialog.askopenfile()
if file:
new_file = file.name
# os.replace(new_file, old_file)
shutil.copy2(new_file, old_file)
self.cmd.tree_refresh()
评论列表
文章目录