本文整理汇总了Python中menu.Menu.verify_yes_no方法的典型用法代码示例。如果您正苦于以下问题:Python Menu.verify_yes_no方法的具体用法?Python Menu.verify_yes_no怎么用?Python Menu.verify_yes_no使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类menu.Menu
的用法示例。
在下文中一共展示了Menu.verify_yes_no方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_modification
# 需要导入模块: from menu import Menu [as 别名]
# 或者: from menu.Menu import verify_yes_no [as 别名]
def get_modification(self):#integrate options, perhaps send to 'get' functions and change those to file mods
choice = None
resume = False
while choice != 'q':
if self.mod_key == "Resume":
# if self.mod_value != None:
# print("\n\t\tHere is the current resume.")
# resume = self.controller.get_resume(self)
# self.open_resume(resume)
# choice = input("Please enter the new resumes file path\nand file name with a .pdf ending: ")
# resume = self.save_resume(choice)
# new_value = choice
print("\n\t\tResume saving inside database is currently malfunctioning, pick another option please.")
time.sleep(4)
break
else:
print("\n\t\tYou have chosen to modify '{}'.\n".format(self.mod_key))
print("\nOpening contents in text editor. Please modify and save the file.")
self.open_data()
new_value = None
choice = input("\n\t\tPress enter to continue when ready...")
if not new_value:
new_value = self.save_data()
Menu.clear_screen()
print("\nThe information you have entered is:\n{}".format(new_value))
verify = input("Is this correct? 'y' to confirm: ").lower()
if Menu.verify_yes_no(verify):
print("\nEntry complete and saving now.")
if resume:
self.info[self.mod_key] = resume.encode('utf8')
else:
self.info[self.mod_key] = new_value
choice = 'q'
time.sleep(2)
return resume
示例2: get_resume
# 需要导入模块: from menu import Menu [as 别名]
# 或者: from menu.Menu import verify_yes_no [as 别名]
def get_resume(self):
while True:
Menu.clear_screen()
location = input("Please attach the candidate resume by specifying the file path with a .pdf ending: ")
print("The file path for the candidate's resume is: {}".format(location))
verify = input("Is this correct? 'y' to confirm: ").lower()
if Menu.verify_yes_no(verify):
resume = self.save_resume(location)
self.info['Resume'] = resume
break
示例3: get_skills
# 需要导入模块: from menu import Menu [as 别名]
# 或者: from menu.Menu import verify_yes_no [as 别名]
def get_skills(self):
while True:
Menu.clear_screen()
if self.emp_flag:
skills = input("Please input any specific skills the employer is looking for separated by a ',' each:\n>>> ")
else:
skills = input("Please input any specific skills the candidate has separated by a ',' each:\n>>> ")
print("The skills you have entered are:\n{}".format(skills))
verify = input("Is this correct? 'y' to confirm: ").lower()
if Menu.verify_yes_no(verify):
self.info['Skills'] = skills
break
示例4: get_address
# 需要导入模块: from menu import Menu [as 别名]
# 或者: from menu.Menu import verify_yes_no [as 别名]
def get_address(self):
while True:
Menu.clear_screen()
if self.emp_flag:
address = input("Please input the employer address: ")
else:
address = input("Please input the candidate address: ")
print("The address you have entered is: {}".format(address))
verify = input("Is this correct? 'y' to confirm: ").lower()
if Menu.verify_yes_no(verify):
self.info['Address'] = address
break
示例5: get_name
# 需要导入模块: from menu import Menu [as 别名]
# 或者: from menu.Menu import verify_yes_no [as 别名]
def get_name(self):
while True:
Menu.clear_screen()
if self.emp_flag:
name = input("Please input the employer name: ").title()
else:
name = input("Please input the candidate name: ").title()
print("The name you have entered is: {}".format(name))
verify = input("Is this correct? 'y' to confirm: ").lower()
if Menu.verify_yes_no(verify):
self.info['Name'] = name
break
示例6: get_job_offers
# 需要导入模块: from menu import Menu [as 别名]
# 或者: from menu.Menu import verify_yes_no [as 别名]
def get_job_offers(self):
while True:
Menu.clear_screen()
if self.emp_flag:
job_offers = input("Please input any information on job offers the employer has available:\n>>> ")
else:
job_offers = input("Please input any information on job offers the candidate has received:\n>>> ")
print("The job offer information you have entered is:\n{}".format(job_offers))
verify = input("Is this correct? 'y' to confirm: ").lower()
if Menu.verify_yes_no(verify):
self.info['Job Offers'] = job_offers
break
示例7: get_notes
# 需要导入模块: from menu import Menu [as 别名]
# 或者: from menu.Menu import verify_yes_no [as 别名]
def get_notes(self):#input longer than one line doesn't work
self.mod_key = "Notes"
choice = None
while choice != 'q':
Menu.clear_screen()
print("\nEnter notes in text editor. Save the file when finished.")
time.sleep(2)
self.open_data()
choice = input("\n\t\tPlease type 'done' when finished.\n>>>> ").lower().strip()
if choice == 'done':
new_value = self.save_data()
print("The notes you have entered are:\n{}".format(new_value))
verify = input("Is this correct? 'y' to confirm: ").lower()
if Menu.verify_yes_no(verify):
print("\nEntry complete and saving now.")
self.info[self.mod_key] = new_value
choice = 'q'
time.sleep(2)