def get_username_password(self):
"""??????? ????????"""
try:
opts, args = getopt.getopt(self.argv[1:], 'hu:p:', ['username=', 'password='])
except getopt.GetoptError:
self.logger.info('????????????????')
self.logger.info('cqut.py -u <username> -p <password>')
sys.exit(-1)
for opt, arg in opts:
if opt in ('-u', '--username'):
self.username = arg
elif opt in ('-p', '--password'):
self.password = arg
if self.username is None:
self.username = input('???????: ')
if self.password is None:
self.password = input('???????: ')
评论列表
文章目录