Dec-26-2023, 08:31 PM
1. I'm using the code below and it works well.
I'm able to select my choices but I can't figure out how to access the choices so I can use the information.
I've tried to run pprint(m_g) but it gives me the error "object is not callable"
if I try to print it with an attribute such as m_g.result it tells me it has no attributes.
I'm able to select my choices but I can't figure out how to access the choices so I can use the information.
I've tried to run pprint(m_g) but it gives me the error "object is not callable"
if I try to print it with an attribute such as m_g.result it tells me it has no attributes.
def get_m_g(_): return [ "L", "G", "B", "C", "S", "B", "T", "Co", "Car", ] def main(): m_g = inquirer.checkbox( message="\nChoose the m g:", choices=get_m_g, validate=lambda result: len(result) > 0 and len(result) <= 2, invalid_message="should be at least 1 m g and no more then 2", instruction="(\nselect up to 2 m g)", ).execute()2. can someone explain what is going on here.
if __name__ == "__main__": main()