Pages

Saturday, June 9, 2012

Python: Request user input; use default if none provided


def Request_User_Input(test_mode):
'Gets user input depending on the mode (Batch/Manual)'
if test_mode == 'M':
confirmation = input('\n.............Provide Your Input (P/F): ')
if confirmation.upper() == 'P':
logger.debug('User Provided - PASS')
return 1
else:
logger.debug('User Provided - FAIL')
return 2
if test_mode == 'B':
logger.debug('User Provided - PASS')
return 1

1 comment:

  1. Caesars Casino | Deposit & Withdrawal | Dr.MCD
    Caesars welcomes the best in 삼척 출장안마 online gambling and casino gaming with over 100 exclusive promotions and bonuses available 영주 출장마사지 for 나주 출장안마 US 과천 출장샵 players at 진주 출장안마 our

    ReplyDelete

Please write your comments and suggestions