I have this method who read a file and put the content into a Plain Text.
def show_open_dialog(): global file_path if not save_if_modified():