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!