Login Register






PyInquirer Question filter_list
Author
Message
PyInquirer Question #1
I am still fairly new to python but I have always learned programming easier with a hands on approach by coding but I am stumped at the moment. How do I go about pulling the single value from the input list of PyInquirer. How do I go about storing the value of first_name into a variable. Probably a newb question but hey here to learn Example Code:

Code:
QUESTIONS = [ { 'type': 'input', 'name': 'first_name', 'message': 'Question?', }, { 'type': 'confirm', 'message': 'Answer Confirm?', 'name': 'continue', 'default': True, }, { 'type': 'input', 'name': 'last_name', 'message': 'Question?', }, ] ANSWERS = prompt(QUESTIONS, style=STYLE) pprint(ANSWERS)
“I am thankful for all of those who said NO to me. It’s because of them I’m doing it myself.” – Albert Einstein

Reply

PyInquirer Question #2
I'm using PyInquirer to prompt a list of questions and confirmations. After the question are asked I need to be able to store the answers to the questions in a variable to be used throughout the program.
(This post was last modified: 01-29-2020, 06:54 PM by mudrig.)
“I am thankful for all of those who said NO to me. It’s because of them I’m doing it myself.” – Albert Einstein

Reply