<s> import sublime <EOL> class WarmerListPanel ( object ) : <EOL> def __init__ ( self , window , client , index ) : <EOL> self . window = window <EOL> self . client = client <EOL> self . index = index <EOL> self . choices = [ ] <EOL> def on_done ( self , index ) : <EOL> if index == - <NUM_LIT:1> : <EOL> return <EOL> name = self . choices [ index ] <EOL> self . callback ( name = name ) <EOL> def show ( self , callback ) : <EOL> self . callback = callback <EOL> options = dict ( <EOL> index = self . index <EOL> ) <EOL> try : <EOL> response = self . client . indices . get_warmer ( ** options ) <EOL> except Exception as e : <EOL> return sublime . error_message ( "<STR_LIT>" . format ( e ) ) <EOL> self . choices = [ ] <EOL> for name in response [ self . index ] [ "<STR_LIT>" ] . keys ( ) : <EOL> print ( response [ self . index ] ) <EOL> self . choices . append ( name ) <EOL> self . choices . sort ( ) <EOL> self . window . show_quick_panel ( self . choices , self . on_done ) </s>
