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
3
votes
1 answer
Vim (python mode) Breakpoint
I use Plugin 'klen/python-mode' in my vim, and work fine
but when I want add a break point and run code with python mode, occurs unexpected error, the vim says [Pymode] code running ... and vim is stops, then I must kill the process of vim
My…

Milor123
- 537
- 4
- 20
3
votes
1 answer
Vim Pymode don't use actual env
After my env is activated, I start vim. In the bottom of the screen I see something like this:
"[Pymode] Activate virtualenv: /home/../envs/test_env"
When I'm trying to run my script, vim use system base python, but not from my env.
I have in my…

Bogdan Ruzhitskiy
- 1,167
- 1
- 12
- 21
3
votes
1 answer
Prevent vim from autofolding when typing
Every time i use snippets in vim while coding in Python i get a problem which i desire to get rid off.
Here is the sequence of steps which leads to my problem:
type fun and hit Tab to trigger snippets of a new function
start typing to define its…

xolodec
- 823
- 1
- 8
- 17
3
votes
1 answer
Change the "send code to interpreter" (C-c |) command in python-mode
I am used to "C-c C-r" command to send code to the interpreter in R with Emacs speaks statistics. How can I set python-mode to use "C-c C-r" rather than "C-c |" to evaulate code?
Thanks!

retrot
- 311
- 4
- 10
3
votes
1 answer
Disabling PEP-257 warnings in ]vim python-mode
I know that I can disable pylint warnings by leaving a comment # pylint: disable=XXXX.
How do I do the same thing for pep257 errors?
1 C0110 Exported classes should have docstrings. [pep257]
2 C0110 Exported definitions should have docstrings.…

Ruslan Osipov
- 5,655
- 4
- 29
- 44
3
votes
1 answer
Emacs: split window size in python-mode
I set split-width-threshold to nil, so on execution the python shell will appear in a split window below. However, the shell always occupies half of the frame. Is it possible to adjust the size (automatically on execution)?
The…

user69818
- 403
- 6
- 13
3
votes
2 answers
emacs windows run python program in current buffer and display the output on output window
I use the Python-mode (not the default one comes with emacs 23).
I could not execute the python program currently loaded in emacs.
I am getting "Symbol's function definition is void: smart-operator-mode-on" error.
Any clue or any tips makes a…
user90150
3
votes
2 answers
Evaling files in directory
Is there any way to get python-mode to eval all files in a directory (or at least all the files I'm importing from)?
When I work on a file that imports from another file in the same directory, I have to kill and then re-create the inferior python…

callwithcurrentconfusion
- 31
- 1
- 2
2
votes
2 answers
How do I advise py-execute-buffer in emacs to run py-shell before the function?
I'd like to be editing a buffer or file, hit C-c C-c and have the file sent to an IPython session. I can accomplish this now if I first run M-x py-shell before running py-execute-buffer via C-c C-c. But if I try to advise the function…

aresnick
- 1,635
- 12
- 24
2
votes
0 answers
Duplicate Python Source Code Window in Emacs python-mode
I am using Emacs 27 with Evil mode to write python code.
Every time I do M-x py-execute-buffer, the python source code was duplicated in a new window while the python shell runs. So Emacs would end up with three zones on the screen, one for the…

kzhang
- 31
- 2
2
votes
1 answer
Tabs and Spaces in emacs python-mode / elpy
This has been an exquisite exercise in frustration. For some reason, my python-mode / elpy buffers always have intent-tabs-mode nil. I'm using python-mode 6.2.3, elpy 1.32.0, and emacs 25.2.2. My .emacs file contains:
;;…

Gabe
- 131
- 1
- 13
2
votes
3 answers
using emacs-mode.el to execute with arguments
I'm writing a script that takes arguments, and I'd like to use emacs-model.el's C-c C-c to execute it while I'm writing it. But this merely runs the script without arguments, which then causes my script to complain.
Is there an elegant way around…

pseudosudo
- 6,270
- 9
- 40
- 53
2
votes
3 answers
Update version of Python in Emacs 22.2.1
I've recently install Python 3.1, but Emacs still uses 2.6.5. I'm using Emacs version 22.2.1. I'm not sure which files to edit in order to make Emacs use Python 3.1 by default!
I'm using python-mode.el and pyemacs, if that helps...
Best,
Georgina

Georgina
- 381
- 1
- 6
- 13
2
votes
1 answer
How can I eliminate vim python-mode's 'Call' object has no attribute 'starargs'
The complete spurious warning is:
equivs3e|1 F| F0002 : 'Call' object has no attribute 'starargs' [pylint]
I gather it's got something to do with the new AST code in recent 3.x, and happens to some pylint's outside of vim's…

dstromberg
- 6,954
- 1
- 26
- 27
2
votes
0 answers
quit code checker when when quitting vim
I'm using vim with python-mode plugin. When I quit vim with wq or q, the code check on the bottom doesn't quit. Just wondering if there is a config for quitting code check when vim quit? Thanks

yfeng
- 61
- 5