emacs

Why lsp-mode prompt "command pyls is not present on the path" in emacs?

Why lsp-mode prompt "command pyls is not present on the path" in emacs? Question: OS: Arch Linux I follow the document and I enter pip install ‘python-language-server[all]’ –user in the terminal at last. After opening a python file in Emacs, lsp-mode promat me "command pyls is not present on the path" and no any completion …

Total answers: 2

Python in Emacs shell-mode turns on stty echo and breaks C-d

Python in Emacs shell-mode turns on stty echo and breaks C-d Question: When I run an interactive Python inside an Emacs shell buffer (M-x shell), it does two surprising things to the TTY. First, it turns on input echo, which persists after Python exits, until I do stty -echo. Secondly, it doesn’t accept C-d (or …

Total answers: 3

Step-by-step debugging with IPython

Step-by-step debugging with IPython Question: From what I have read, there are two ways to debug code in Python: With a traditional debugger such as pdb or ipdb. This supports commands such as c for continue, n for step-over, s for step-into etc.), but you don’t have direct access to an IPython shell which can …

Total answers: 16

Comparison of Python modes for Emacs

Comparison of Python modes for Emacs Question: So I have Emacs 24.3 and with it comes a quite recent python.el file providing a Python mode for editing. But I keep reading that there is a python-mode.el on Launchpad, and comparing the two files it jumps out to me that the former is under 4000 lines, …

Total answers: 2

Python Shell in Emacs 24?

Python Shell in Emacs 24? Question: I recently upgraded from Emacs 23 to Emacs 24. Since the upgrade, it seems that I’ve lost the ability to call “M-x python-shell” (!). What happened? Does the included python mode no longer ship with this functionality? Using Emacs 23: ○ /usr/local/bin/emacs -Q Describe function: python-shell python-shell is an …

Total answers: 1

Python code-folding in emacs?

Python code-folding in emacs? Question: I have many classes and defs … I want to have + and – keys before class and def to collapse the class or open it ( toggle it ). How i can do this? Asked By: Mohammad Efazati || Source Answers: You can get code folding (and more) with …

Total answers: 2

Where does this come from: -*- coding: utf-8 -*-

Who originally invented this type of syntax: -*- coding: utf-8 -*- Question: Python recognizes the following as instruction which defines file’s encoding: # -*- coding: utf-8 -*- I definitely saw this kind of instructions before (-*- var: value -*-), so I assume Python did not invent them and is not the only one that uses …

Total answers: 4

ropemacs USAGE tutorial

ropemacs USAGE tutorial Question: There are many sites with instructions on installing ropemacs, but so far I couldn’t find any with instructions on how to use it after it’s already installed. I have it installed, or at least it seems so, Emacs has “Rope” menu in it’s top menu bar. Now what? So far I …

Total answers: 4

Emacs bulk indent for Python

Emacs bulk indent for Python Question: Working with Python in Emacs if I want to add a try/except to a block of code, I often find that I am having to indent the whole block, line by line. In Emacs, how do you indent the whole block at once. I am not an experienced Emacs …

Total answers: 8

Debugging python programs in emacs

Debugging python programs in emacs Question: How to debug python programs in emacs? I use python-mode.el I get reference like import pdb; pdb.set_trace(); but not sure how to use it. Asked By: user90150 || Source Answers: Type M-x cd to change directory to the location of the program you wish to debug. Type M-x pdb. …

Total answers: 3