When I use default inferior shell I can set something like this:
(setq python-shell-interpreter "python" python-shell-interpreter-args "-i /absolute/path/to/manage.py shell_plus")
How set this with
(setq-default py-shell-name "python" ; \ Default value under Unices py-python-command "python" ; / py-python-command-args '("-i" "/absolute/path/to/manage.py" "shell_plus"))
I recommend you read section
Selecting a Python shell from this file, but perhaps I can elaborate on what I think you are looking for:
py-shell-nameis the path to the default python executable that gets run when you invoke
M-x py-shell(which command is bound to
C-c !by default).
python-mode.el defines multiple customisable variables for holding python interpreter arguments:
Which one takes effect depends on the value of
py-shell-name and/or any shebang in your source file. The shebang also determines which interpreter gets selected amongst the customisable variables
py-python-command-args are the fallback when the other flavours of python executable are not detected.
This is my understanding following a cursory glance at the package's source, so I might have misunderstood or missed something.
Either way, I recommend you read the project's
README and have a look at the settings in
M-x customize-group RET python-mode RET.
Customize default Python shell as `py-shell-name'
py-shell-name' might be an installed default executable as shell
commandtype' would display, but also a PATH/TO/EXECUTABLE
If different flavours of Python are installed, customize py-python-command versions
py-python-command (default) py-python2-command py-python3-command py-ipython-command py-python-command-args py-python2-command-args py-python3-command-args py-ipython-command-args