def askUserForEncryptionKey():
if DEBUG: # Allows testing instead of requiring a user prompt
return 'ipwb'
outputRedirected = os.fstat(0) != os.fstat(1)
promptString = 'Enter a key for encryption: '
if outputRedirected: # Prevents prompt in redir output
promptString = ''
print(promptString, file=sys.stderr)
key = raw_input(promptString)
return key
评论列表
文章目录