Jan-18-2022, 11:05 AM
I created a startup script file
PS, I am using Python 3.9.5 interpreter in miniconda3 on Windows 10. I start Python interpreter by typing "python". The above start-up script file exists and the environment variable PYTHONSTARTUP is set up properly.
import readline readline.parse_and_bind("set disable-completion on") readline.parse_and_bind("tab: self-insert")and point environment variable PYTHONSTARTUP to it. The effect of this start-up script is that I can type Tab key as 8 space bars in the Python interpreter command line, instead of as a command of completion. Although I'm sure this start-up script is indeed executed when Python interpreter is started, the statements are not in effect. That is, when I type Tab key, the python command line still tries to complete and utters a lot of error (because there is nothing to be completed). These commands take effects only if I type them in Python command line explicitly. So, is
readline.parse_and_bind()
function known to not work in start-up scripts? If it is supposed to be working, how can I make it work?PS, I am using Python 3.9.5 interpreter in miniconda3 on Windows 10. I start Python interpreter by typing "python". The above start-up script file exists and the environment variable PYTHONSTARTUP is set up properly.