Pycharm Terminal/console not working with inquirer


This code below comes directly from the inquirer documentation.
If I run this code in pycharm, all it does is print, and I can't type in an answer.
If I type something in and press enter, it just does what enter would normally do on any text editor.

And if I try running the same code using the built in python console that pycharm has, I Type in my answer and all I get is "previous command line is still running"
Someone please help because this code has no errors and should work.

import inquirer
import re
import os
import sys
questions = [
inquirer.Text('name', message="What's your name"),
inquirer.Text('surname', message="What's your surname"),
inquirer.Text('phone', message="What's your phone number",
validate=lambda _, x: re.match('\+?\d[\d ]+\d', x),
answers = inquirer.prompt(questions)
1 comment
Comment actions Permalink

Does it behave differently if you run the code from the terminal outside of IDE?


Please sign in to leave a comment.