'Python Inquirer in Jupyter Lab console

Is it possible to use python-inquirer in a Jupyter Lab Console?

I was using ipywidgets in a notebook. Then I dicovered that this lib does not work in the jupyter console.

python-inquirer does not work in regular jupyter notebook and does not work in a jupyter console as well.

I've tried InquirerPy and also simple-term-menu. Both failed in Jupyter Console.

Can anyone tell me about some lib or a workaround to reach the inquirer behaviour in Jupyter Console?

Code sample:

import inquirer
questions = [
  inquirer.List('size',
                message="What size do you need?",
                choices=['Jumbo', 'Large', 'Standard', 'Medium', 'Small', 'Micro'],
            ),
]
answers = inquirer.prompt(questions)

Thanks in advance.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source