Based on this question I discovered how to fix the echoing problem in the python shell in emacs. What I want to do is add this to my .emacs file so that it will happen automati
My brief investigation into this shows that python-mode
(as found in my Emacs) has no py-shell-hook
, so naturally it won't run anything you put in there.
When I looked at python-mode
, there are no hooks that it runs, so you are a bit out of luck.
Your best bet it to just make your own command, for exmaple:
(defun alex-python-shell ()
"Start a python shell my way."
(interactive)
(python-shell)
(python-startup))
If you need to call python-shell
interactively, use
(call-interactively 'python-shell)