<s> '''<STR_LIT>''' <EOL> from idlelib . idle_test . mock_tk import Text <EOL> class Func ( object ) : <EOL> '''<STR_LIT>''' <EOL> def __init__ ( self , result = None ) : <EOL> self . called = False <EOL> self . result = result <EOL> self . args = None <EOL> self . kwds = None <EOL> def __call__ ( self , * args , ** kwds ) : <EOL> self . called = True <EOL> self . args = args <EOL> self . kwds = kwds <EOL> if isinstance ( self . result , BaseException ) : <EOL> raise self . result <EOL> else : <EOL> return self . result <EOL> class Editor ( object ) : <EOL> '''<STR_LIT>''' <EOL> def __init__ ( self , flist = None , filename = None , key = None , root = None ) : <EOL> self . text = Text ( ) <EOL> self . undo = UndoDelegator ( ) <EOL> def get_selection_indices ( self ) : <EOL> first = self . text . index ( '<STR_LIT:1.0>' ) <EOL> last = self . text . index ( '<STR_LIT:end>' ) <EOL> return first , last <EOL> class UndoDelegator ( object ) : <EOL> '''<STR_LIT>''' <EOL> def undo_block_start ( * args ) : <EOL> pass <EOL> def undo_block_stop ( * args ) : <EOL> pass </s>
