def getCredentials():
'''prompt user for username and password'''
colourPrint('bold',
('You may wish to store your credentials and server ' +
'preferences in this file by opening it in a text editor ' +
'and filling in the username, password, and server ' +
'fields.\nIf you choose not to do this, you will be ' +
'prompted for this information on each run of this script.'))
colourPrint('yellow',
'\nPlease enter your username for SmoothStreamsTV:')
username = input('')
colourPrint('green',
'\nThank you, ' + username + '.\n')
colourPrint('yellow',
'\nPlease enter your password for SmoothStreamsTV:')
password = getpass('')
return username, password
# end getCredentials()
评论列表
文章目录