customer_action_asker.py 449 B

123456789101112131415161718
  1. from PyInquirer import prompt
  2. # Ask for an action to manage orders
  3. class CustomerActionAsker:
  4. def __init__(self):
  5. self.widget = [
  6. {
  7. 'type':'list',
  8. 'name':'action',
  9. 'message':'What do you want to do about orders ?',
  10. 'choices':['list orders','list warehouses','new order','quit']
  11. }
  12. ]
  13. def ask(self):
  14. return prompt(self.widget)