-
Notifications
You must be signed in to change notification settings - Fork 747
Open
Description
I was trying to run my application on a python docker container but the prompt is not shown. Here is a simple way to reproduce it.
docker pull python
docker run --name python -dit python
docker exec -it python /bin/bash
then in the container, install prompt_toolkit
pip install git+https://github.com/jonathanslenders/python-prompt-toolkit
a simple script test.py
from prompt_toolkit import prompt
print("enter something")
text = prompt("> ")
print("you entered %s." % text)
run the script and enter "foo"
root@2084abd7fdb1:/# python test.py
enter something
you entered foo.
Note that the prompt was not shown in above.
Interestingly, it works again if I reset the terminal
root@2084abd7fdb1:/# reset
root@2084abd7fdb1:/# python test.py
enter something
> bar
you entered bar.
BTW, I am using macOS iTerm if it matters.
Metadata
Metadata
Assignees
Labels
No labels