#NEWLINE# def get_passphrase( prompt = 'Enter passphrase: ' , defaultPass = None ) : #NEWLINE# #INDENT# 'Prompt for a passphrase, allowing pre-populated *defaultPass*.' #NEWLINE# passwd = getpass ( prompt ) #NEWLINE# while ( not len ( passwd ) ) : #NEWLINE# #INDENT# if defaultPass : #NEWLINE# #INDENT# passwd = passwd #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# passwd = getpass ( '  You must enter a passphrase: ' ) #NEWLINE# #UNINDENT# #UNINDENT# return passwd