0

I would like to get user input using the input() function. My problem is that the prompt text doesn't show up until after the user enters the answer to input.

Example instruction:

res  = input('Say something:')

How to make the 'Say something:' text show up before getting the user input instead of after?

Possibly relevant information:

  • I am using IDLEX (https://github.com/serwy/idlex) as an IDE and start it using this instruction: python -m idlexlib.launch (as recommended by the instructions)
  • The input code works as expected when run from IDLE or from the command line, so this seems specific to idlex or the way I call it.
  • This is using python 3 on Windows 10.
  • I've looked into questions like these How can I flush the output of the print function? and tried import sys; sys.stdout.flush() without success.

thanks for any help!

leonos
  • 131
  • 7
  • your code is correct. `input` statement never behave like this. this is definitely a problem with IDLEX. I suggest you use vscode or sublime text – Musabbir Arrafi Aug 28 '23 at 16:21

0 Answers0