<s> """<STR_LIT>""" <EOL> from tkinter import * <EOL> import tkinter . messagebox as tkMessageBox <EOL> class FileRevert : <EOL> menudefs = [ ( '<STR_LIT:file>' , [ ( '<STR_LIT>' , '<STR_LIT>' ) ] ) ] <EOL> def __init__ ( self , editwin ) : <EOL> self . text = editwin . text <EOL> self . io = editwin . io <EOL> def revert_file_event ( self , event ) : <EOL> fname = self . io . filename <EOL> if fname is None : <EOL> return <EOL> if not self . io . get_saved ( ) : <EOL> msg = "<STR_LIT>" % fname <EOL> res = tkMessageBox . askyesnocancel ( <EOL> master = self . text , <EOL> title = "<STR_LIT>" , <EOL> message = msg ) <EOL> if res is None : <EOL> return <EOL> elif res : <EOL> self . io . save_a_copy ( event ) <EOL> self . io . loadfile ( fname ) </s>
