Python-mode is a vim plugin that helps you to create python code very quickly by utilizing libraries including pylint, rope, pydoc, pyflakes, pep8, and mccabe for features like static analysis, refactoring, folding, completion, documentation, and more. (from GH)
Questions tagged [python-mode]
150 questions
6
votes
2 answers
Vim getting indentation wrong for Python code (with the python-mode Plugin)
As shown in the following screen-cast, I demonstrate the strange behaviors of Vim when it comes to adding comments to Python code. Between Demo 1 and Demo 2, I was only starting the line of comments at different indentation level (inside a class…

llinfeng
- 1,316
- 1
- 15
- 39
6
votes
3 answers
What combination of python-mode, ipython, (ipython.el) versions/releases and init.el/.emacs.d code work?
My goal is to use Emacs 24 as my python editor ( also has a Matlab and R editor but that's not what my question is about ).
(Please let me know if I left out any information or if I did not state something clearly.)
I've been able to set up my…

Rubbert
- 103
- 2
- 8
6
votes
1 answer
How to get Aquamacs to run code in ipython
I am using Aquamacs on OS X lion and trying to use the latest python-mode.el to edit and run my python code. I can get the ipython shell to open by typing C-!, but if I run either C-c
C-c or C-c | the python code runs in a new Python buffer without…

Craig
- 901
- 7
- 18
6
votes
3 answers
vim, pathogen, and load order of ftplugin files
I've been using Vim and pathogen for a while, and things were working fine, but recently I've started having load order issues with my ftplugin configuration.
The specific problem I'm having right now is that python-mode is overriding my ftplugin…

Jim Stewart
- 16,964
- 5
- 69
- 89
5
votes
3 answers
Using multiple Python shells in Emacs 'python-mode' with Python or IPython
Is there a way to force a new instance of python-shell while running Emacs? It would be convenient when working on multiple projects with separate working directories (and different sets of modules).
Any attempt to invoke python-shell will only pull…

hatmatrix
- 42,883
- 45
- 137
- 231
5
votes
3 answers
Execute the expression and print its value in Emacs python mode
I'm using Emacs python-mode and ipython as my IDE to write the python code. Python-mode provides a nice function "py-execute-line" to run one line code, and I've bound it to key "F7".
So for the following code:
cell = "Human" # Move the cursor to…

user3915365
- 103
- 5
5
votes
0 answers
message "Text is read-only" on multiple execution of un-changed buffer in python-mode
I am setting up my emacs (24.3) with python-mode. I would like to be able to edit the python buffer and execute it in python shell with "C-c C-C". This mostly works. But I am getting "Text is read-only" error if I stay in python code buffer and…

Roman Shestakov
- 497
- 5
- 16
5
votes
1 answer
Emacs: How to start Local python interpreter when editing a remote python file via tramp
On Emacs, when I start python with C-c ! while editing a remote python file (using tramp - plinkx: on windows), the python interpreter is started on the remote host.
Is there any way I can edit the remote python file and start a local python…

Shanmu
- 938
- 7
- 15
4
votes
1 answer
Setting up emacs with autocomplete, python-mode, and rope
I have all of the above installed. Rope seems to work just fine but I get the error below when I try to run auto-complete:
Symbol's function definition is void: rope-completions
I can't figure this out for the life of me. Any suggestions where to…

J Spen
- 2,614
- 4
- 26
- 41
4
votes
2 answers
How to stop debugging python in vim
It is my first time to edit python code in vim equipped with python-mode plugin. After setting breakpoints, I use "\ r" command to run it.Then it keep still after printing '[pymode]code running...'.I try some ways but still can not quit debug.It…

lhao0301
- 1,941
- 4
- 20
- 26
4
votes
2 answers
Enable auto-indent in python-mode (python.el) in Emacs 24?
I've recently declared emacs bankruptcy and in rebuilding my config switched from the old python-mode.el to the built-in python.el.
One thing that's I'm missing is the old behaviour of auto-indenting to the correct level when hitting RET. Is there…

Phillip B Oldham
- 18,807
- 20
- 94
- 134
4
votes
2 answers
How can I clear Vim's interface of the PyLint marks?
I've configured python-mode to check manually. So I type :PyLint and it checks my code, showing the "QuickFix" window and some marks at the side. I can subsequently close the QuickFix window by typing :onlyin the other window or so, but how can I…

Antonis Christofides
- 6,990
- 2
- 39
- 57
4
votes
1 answer
Why does the python interpreter not print input code and output in emacs python shell buffer for python-mode?
My current python setup in emacs is:
(setq py-shell-name "ipython") ;; sudo pip install ipython
(setq py-shell-name "/usr/local/bin/ipython")
(setq py-force-py-shell-name-p t)
(add-to-list 'load-path "~/.emacs.d/python-mode.el-6.1.0/")
(setq…

Vinh Nguyen
- 1,014
- 1
- 9
- 19
3
votes
3 answers
emacs python-mode: designate which python shell to send commands to
A follow up on this question - if I have two python shells running in emacs, how can I designate which shell commands from each python script buffer is sent to? I suspect it has something to do with python-buffer and python-set-proc but setting…

hatmatrix
- 42,883
- 45
- 137
- 231
3
votes
1 answer
Determine path to source code of current mode in Emacs 23
I'm trying out a new Python mode for Emacs 23, but I'm not sure how to tell if I'm using the new mode (source code located at ~/.elisp/python.el) or the bundled python.el mode.
Is there a way to find out where the current (or any active) mode was…

Will McCutchen
- 13,047
- 3
- 44
- 43