473,396 Members | 1,995 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

backspace problems

kj


If I'm in the python interactive interpreter, I get a beep when I
hit the backspace key.

I must confess, though, that my terminal is "complicated", to put
it mildly: I work on a Mac running Leopard; I open a Terminal
session, and through it I ssh to an Ubuntu server; on this server
I connect to a permanently-running GNU screen session, which has
several multiplexed windows going, all running zsh; it is in this
convoluted environment that I run the python interactive interpreter.[*]

I've determined that the problem occurs only within the GNU screen
session. GNU screen is one of the coolest Unix programs ever, one
that literally changed the way I work, is there's no way I'll stop
using it. So I need to figure out how to fix this.

How can I determine the character that the python session is
receiving when I hit the backspace key, and how can I tell it to
handle it as a backward-delete character?

TIA!

kynn
[*] Actually, it gets worse. My .zshrc file (which gets executed
whenever an interactive shell is started) runs the command

bindkey '^[[3~' backward-delete-char

because, otherwise my regular zsh interaction would not handle the
backspace key properly. But the problem I described above occurs
whether this command is executed or not.
--
NOTE: In my address everything before the first period is backwards;
and the last period, and everything after it, should be discarded.
Jul 29 '08 #1
1 5611
kj
In <g6**********@reader1.panix.comkj <so***@987jk.com.invalidwrites:

<snip>

Please ignore my question. I found a general solution that works
not only for the python interactive interpreter but also for all
programs that have a readline-type interaction. This solution has
nothing to do with Python, but if anyone's interested, it's here:

http://www.macosxhints.com/article.p...space%2Bdebian

kynn
--
NOTE: In my address everything before the first period is backwards;
and the last period, and everything after it, should be discarded.
Jul 29 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Dennis Craven | last post by:
Hello, Does anyone know how one could insert a backspace into a widget such as a TextView/Buffer in Pygtk? Whenever I try something like insert(iter, '\b') I get jibberish inserted into the...
1
by: haxmya | last post by:
Ok, made an explorer toolbar (band Object) with a textbox on it. Everything works great....except that the backspace button doesn't actually backspace when you're in the textbox. Shift-backspace...
6
by: Robert Nurse | last post by:
Hi, Is it at all possible to capture and suppress the backspace key when focus is not on a form edit control? Basically, while the page is loading I don't want the user pressing the backspace...
17
by: Julia Briggs | last post by:
Are there any gotchas using if (event.keyCode==8)? I understand that to represent backspace, but it doesn't work. I am running Windows XP, using a typical keyboard - but no luck in detecting...
3
by: Dave Christian | last post by:
What event gets fire off? I thought it might be an onLoad event, but that doesn't seem to be the case. (I have some variables displayed on my page that, upon a Backspace (or even hitting the...
9
by: Toralf Kirsten | last post by:
Hi, we installed db2 v8.1 on red hat linux 9. Unfortunately, the backspace and the delete button doesn't work in the right way. Instead of deleting chars, control characters are inputed. That...
44
by: G Patel | last post by:
Hi, I would like to write a program that checks to see if the user has hit backspace (so the program can go back to a previous stage). How would I test for this? I tried if( (c =...
3
by: C# | last post by:
I have a richtextbox that i am copying to an invisible richtextbox . during the keydown and keypress events i am inserting HTML tags into the invisble richtextbox along with the origional text. ...
1
by: Blue | last post by:
This JS limits the input characters into the form. How do I modify it so that it also allows CARRIAGE RETURN and BACKSPACE (for making text correction)? Due to the template engine I am using, I...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.