How do I install the pythonstartup file so that it runs on command like python myfile.py?
I tried to install it into my /home/myuser<
In your ~/.bashrc:
export PYTHONSTARTUP=$HOME/.pythonstartup
and put your python code in $HOME/.pythonstartup, like:
import rlcompleter
import readline
readline.parse_and_bind("tab: complete")
Then run the interactive shell:
python
See the imports from PYTHONSTARTUP are processed. This only works in python interactive mode.
For more information about PYTHONSTARTUP variable, read the python man page:
$ man python