Skip to main content

Questions tagged [python]

use for Python programming language in Emacs. Emacs supports several versions of the language implementation, versions, and coding styles. Python questions should augment with additional tags as appropriate as described in the description below.

Filter by
Sorted by
Tagged with
73 votes
5 answers
49k views

Emacs is an excellent editor - however it is said "to program you first need an IDE" - so how would you build an IDE in the extensively customizable Emacs for PYTHON with all the features of modern ...
Serial Exchangist's user avatar
5 votes
1 answer
386 views

Say, I got a simple Python code snippet: def demo(i): if(i): print "True" else: print "False" I make indent-region for the whole buffer after save using before-save-hook in my ...
CodyChan's user avatar
  • 2,719
0 votes
1 answer
2k views

I'm using the Python REPL in a comint window via the run-python command, and I'm seeing bad behavior when I use the TAB key to do my indentation. For example: >>> for i in range(3): ... ...
abingham's user avatar
  • 927
3 votes
2 answers
586 views

I am loving my elpy setup in emacs, but I have one question. When I put in a ipdb.set_trace() for the ipython shell I want to send code snippets to the iPython shell. Right now my workaround is ...
statmobile's user avatar
3 votes
1 answer
367 views

bpython detects what libraries are installed and has autocompletion for codes that weren't previously written in the text, if you ever used bpython you know what I mean. Sometimes i use bpython ...
Lynob's user avatar
  • 175
1 vote
0 answers
191 views

This only happens in python-mode. When I try to use a text object to, for example, change everything inside or around some brackets (eg ci() it instead edits the first line of the file. So if I have ...
Thomas Parslow's user avatar
5 votes
0 answers
353 views

I'm performing a large python refactor, and one component of that is renaming many variables from camelCase to snake_case. I'd like to hook a camel-to-snake conversion function (which I already have) ...
Matthew Piziak's user avatar
1 vote
1 answer
287 views

I'm trying to figure out how to approach a bug I've run into. I assume it's actually a bug in Emacs, but I don't know the right way to make headway with it. In short, I'm getting the message "binding ...
abingham's user avatar
  • 927
5 votes
1 answer
2k views

I am using emacs-24.3, which comes with python.el and IPython support out of the box (or so they say). Is there documentation for this mode? Where can I find it?
dmvianna's user avatar
  • 432
4 votes
2 answers
6k views

I am starting a Python virtualenv through init.el (or so I would like): (require 'virtualenvwrapper) (venv-workon "my-python-project") However, flycheck does not find flake8 or pylint, which are ...
dmvianna's user avatar
  • 432
1 vote
0 answers
34 views

When I'm using pylint-mode for a big refactor, I quite frequently want to banish lower-priority errors to the bottom of the buffer. Currently I have to skip the same errors ever time I refresh the ...
Matthew Piziak's user avatar
6 votes
1 answer
1k views

I'm using Emacs 24.4.1 on OSX (installed with Homebrew), with the built in python.el, and Python 3 (also installed with Homebrew), along with IPython 2.3.0. I have this in my .emacs: (setq python-...
cjauvin's user avatar
  • 594
4 votes
1 answer
1k views

When I try to start a Python shell in Emacs 24.4.1 running on Windows, I get an error "invalid argument" when Emacs tries to spawn the process. This is occurring because Python is installed under c:\...
Llaves's user avatar
  • 181
3 votes
1 answer
202 views

With Emacs 24.3 I get certain keywords highlighted in an inferior Python buffer: This is no longer the case for Emacs 24.4: What could possibly cause this? I've made sure it's not my configuration by ...
wasamasa's user avatar
  • 22.6k
5 votes
1 answer
771 views

While trying to run a python script in an Inferior Python buffer for Python 3.3.5 in my Emacs 24.3.1 GTK+ window, I get a >>> Traceback (most recent call last): File "<stdin>", line ...
Anaphory's user avatar
  • 240
7 votes
3 answers
2k views

I'm using the new emacs 24.4 prettify-symbols-mode, but it isn't behaving consistently. I turn it on with: (prettify-symbols-mode t) (global-prettify-symbols-mode t) And I'm trying to change the way ...
mankoff's user avatar
  • 4,386
3 votes
1 answer
767 views

I am trying to use aggressive-indent, which I find great, but when I am writing Python code it doesn't seem to work (although general it works fine). I may miss something in the usage of aggressive-...
Adam's user avatar
  • 2,527
3 votes
1 answer
1k views

I use pdb with gud to debug python scripts. I am just wondering if there is way to highlight the lines with breakpoints? For example, in some screenshots of gud-gdb, some people seem to have red ...
user69818's user avatar
  • 133
2 votes
1 answer
2k views

Whenever I'm in Python mode and do C-c C-c, I have to answer two questions - firstly, what command to run (which defaults to /usr/bin/python2 -i for me) and secondly, whether I want a dedicated ...
Koz Ross's user avatar
  • 425
1 vote
0 answers
495 views

When I call run-python, I get the buffer with python REPL and the prompt. I can type stuff, but when I press enter there is no reaction (except the cursor moves in new line). If I press C-c C-c (...
Matej Fröbe's user avatar
3 votes
1 answer
81 views

I have been using a forked version of python.el for some time in which I have changed the indentation rules so that instead of something.method1()\ .method2() and stuff = (1, 2, 3, ...
asmeurer's user avatar
  • 1,632
11 votes
1 answer
4k views

I'm using Emacs 24.4. When writing Python code, Emacs behaves strangely with respect to indentation. For example: for i in range(10): print(i) for i in range(10) When I input :, Emacs adds a ...
Hunger's user avatar
  • 213
18 votes
2 answers
5k views

I would like to be able to report warnings and errors when evaluating a Python code block in an Org file. When a code block has Python syntax errors, Org helpfully pops them up in a separate ...
user avatar
20 votes
2 answers
5k views

I have an org-mode file containing a table of data and two Python code blocks to extract different summaries from it. I would like to share some common constants and functions between these two code ...
user avatar
7 votes
1 answer
5k views

I'm trying to get eldoc-mode to work in python-mode. If I enter a python buffer and do M-x eldoc-mode M-x python-mode-switch-to-shell This seems to work for some built-in functions, but mostly ...
Nathaniel Flath's user avatar
18 votes
2 answers
1k views

I type a python docstring all on one line like this: """ This is a long docstring. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. Maecenas ...
bstpierre's user avatar
  • 290
3 votes
0 answers
303 views

I am using company-mode and python-mode (note the same issue does not happen with python.el) and something about the combination is causing emacs to automatically expand at point. For example, if I ...
noaham's user avatar
  • 181
7 votes
1 answer
2k views

I use python-mode for my Python code, and every once in a while the syntax highlighter gets confused and thinks everything in the buffer is a string literal. This typically seems to happen when I ...
abingham's user avatar
  • 927
8 votes
2 answers
3k views

I noticed that I can't use virtualenvwrapper commands (like workon) in an eshell but they do work within a shell environment. Is there a virtualenvwrapper-like mode for Emacs?
calizarr's user avatar
11 votes
3 answers
3k views

I'm trying to make EIN work within Emacs, but right now (with IPython 2) it seems that it's not possible. This errors arise: REQUEST [error] Error from parser ein:json-read: (json-readtable-error) ...
El Diego Efe's user avatar
  • 1,631

1
11 12
13
14 15
21