How can I get Emacs' key bindings in Python's IDLE?

I use Emacs primarily for coding Python but sometimes I use IDLE. Is there a way to change the key bindings easily in IDLE to match Emacs?


Asked by: Fiona617 | Posted: 01-10-2021






Answer 1

IDLE provides Emacs keybindings without having to install other software.

  1. Open up the menu item Options -> Configure IDLE...
  2. Go to Keys tab
  3. In the drop down menu on the right side of the dialog change the select to "IDLE Classic Unix"

It's not the true emacs key bindings but you get the basics like movement, saving/opening, ...

Answered by: Andrew813 | Posted: 02-11-2021



Answer 2

There's a program for Windows called XKeymacs that allows you to specify emacs keybindings for different programs. It should work with IDLE.

http://www.cam.hi-ho.ne.jp/oishi/indexen.html

-Mark

Answered by: Emily99 | Posted: 02-11-2021



Answer 3

'readline' module supposedly provides Emacs like key bindings and even functionality. However, it is not available on Windows but on Unix. Therefore, this might be a viable solution if you are not using Windows.

import readline

Since I am running IDLE on Windows it is unfortunately not an option for me.

Answered by: Nicole670 | Posted: 02-11-2021



Similar questions

What Python bindings are there for CVS or SVN?

I once did a cursory search and found no good CVS bindings for Python. I wanted to be able to write helper scripts to do some fine-grained manipulation of the repository and projects in it. I had to resort to using popen and checking stdout and stderr and then parsing those. It was messy and error-prone. Are there any good quality modules for CVS integration for Python? Wh...


Python SVN bindings for Windows

Where can I find precompiled Python SWIG SVN bindings for Windows?


SWIG Python bindings for OpenCV 2.0 with MacPorts

Y'all, I've been at to for 3 days trying to get OpenCV Python binds happening, and I have (the full epic struggle is documented here) but despite turning the SWIG flag on in CMake after installing swig via macports, I'm not getting any SWIG action :( My cmake command looks like: cmake -D CMAKE_...


windows - vlc python bindings - how to receive keyboard input?

I'm trying to use VLC's python bindings to create my own little video player. The demo implementation is quite simple and nice, but it requires all the keyboard commands to be typed into the console from which the script was run. Is there any way I can handle keyboard input also when the video player itself has focus? Specifically, I c...


how to call a c++ file from python without using any of the spam bindings?

i have this encryption algorithm written in C++ , but the values that has to be encrypted are being taken input and stored in a file by a python program . Thus how can i call this c++ program from python?


gobject - Python bindings for a vala library

I am trying to create python bindings to a vala library using the following IBM tutorial as a reference. My initial directory has the following two files: test.vala using GLib; namespace Test { public class Test : Object { public int sum(int x, int y) { re...


python - Writing bindings and wrappers

I keep seeing people writing wrappers for, say a module written in X language to use it in Y language. I wanted to know the basics of writing such wrappers. Where does one start from? My question here is more specific for libgnokii, how do I begin to write python bindings for it.


Python hangs with Qt bindings

I have a 2.6 python installed with latest PySide Qt bindings. The following code hands if thread.start() line is uncommented. Anyone can suggest what i'm doing wrong? from PySide.QtCore import * from PySide.QtGui import * import sys app = QApplication( sys.argv ) window = QWidget() window.show() thread = QThread() # thread.start() app.exec_()


python - SWIG C++ bindings with callback

I am writing some SWIG/Python bindings for some C++ code. This is for what is called the Kinect Accidental API, I have the motor and led functions working. The callbacks to the Listener class which parse and populate the RGB and Depth buffers do not seem to get called from SWIG. The data capture threads evidently start up and start hogging the CPU, bu...


c - Where can I find the Python bindings for GIO's GSocket?

Where are the Python bindings, or what is the current status of the Python bindings for GIO's GSocket and other






Still can't find your answer? Check out these communities...



PySlackers | Full Stack Python | NHS Python | Pythonist Cafe | Hacker Earth | Discord Python



top