<s> """<STR_LIT>""" <EOL> from fabric . api import prompt <EOL> def confirm ( question , default = True ) : <EOL> """<STR_LIT>""" <EOL> if default : <EOL> suffix = "<STR_LIT>" <EOL> else : <EOL> suffix = "<STR_LIT>" <EOL> while True : <EOL> response = prompt ( "<STR_LIT>" % ( question , suffix ) ) . lower ( ) <EOL> if not response : <EOL> return default <EOL> if response in [ '<STR_LIT:y>' , '<STR_LIT:yes>' ] : <EOL> return True <EOL> if response in [ '<STR_LIT:n>' , '<STR_LIT>' ] : <EOL> return False <EOL> print ( "<STR_LIT>" ) </s>
