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.
Larz60+ write Jan-18-2022, 02:41 PM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Fixed for you this time. Please use bbcode tags on future posts.
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Fixed for you this time. Please use bbcode tags on future posts.