def func_replace(): if (inputtext.get() == ""): easygui.exceptionbox(msg="enter file name with its path", title="WARNING") return e = easygui.enterbox(msg="enter value to be replaced", title="replace text", default="") e2 = easygui.enterbox(msg="replace previous value with", title="replace with text", default="") if (easygui.boolbox(msg="Are you sure", title="confirm")): FileManupulation(inputtext.get()).replace_all(e, e2)
def func_append_content(): e = easygui.codebox(msg='enter data to be appended', title="append content") if (e != ""): FileManupulation(inputtext.get()).append_content(e)
def func_append_file(): FileManupulation(inputtext.get()).append_file(inputtext1.get())
def func_create(): FileManupulation(inputtext.get()).create_file(inputtext.get())
def func_delete(): FileManupulation(inputtext.get()).delete_file(inputtext.get())
def func_show(): root2 = Toplevel() val = inputtext.get() con = FileManupulation(val).show_file() + "" Label(root2, text=con, width=100, height=5, bg="white").pack() root2.mainloop()
def func_delete_data(): if (easygui.boolbox(msg="Are you sure to delete content of file", title="confirm")): FileManupulation(inputtext.get()).delete_content()