473,545 Members | 2,717 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

python command mis-interprets arrow keys

My python command line seems messed up. I can't seem to be able to use my
backspace key nor my arrow keys.

I only get control characters: ^[[A^[[D^[[D^[[D^[[C^[[C^[[C etc.

I access my Linux box via a SecureCRT console. Only after opening the
python interpreter does this occur. Linux command like is OK. vim
interprets keystrokes correctly. So do other interpreters e.g. gnuplot.

$LANG $TERM
en_US xterm-color

Versions:
Python 2.4.4
GCC 4.1.2 20070925 (Red Hat 4.1.2-33)
Any sugesstions? Google did not throw anything relevant.
--
Rahul
Jun 27 '08 #1
4 2686
Rahul schrieb:
My python command line seems messed up. I can't seem to be able to use my
backspace key nor my arrow keys.

I only get control characters: ^[[A^[[D^[[D^[[D^[[C^[[C^[[C etc.

I access my Linux box via a SecureCRT console. Only after opening the
python interpreter does this occur. Linux command like is OK. vim
interprets keystrokes correctly. So do other interpreters e.g. gnuplot.

$LANG $TERM
en_US xterm-color

Versions:
Python 2.4.4
GCC 4.1.2 20070925 (Red Hat 4.1.2-33)
Any sugesstions? Google did not throw anything relevant.
Is libreadline installed?

Diez
Jun 27 '08 #2
"Diez B. Roggisch" <de***@nospam.w eb.dewrote in
news:67******** *****@mid.uni-berlin.de:
>
Is libreadline installed?
Thanks for your help Diez. I did a locate and found:

/usr/lib/libreadline.a
/usr/lib/libreadline.so
/usr/lib/libreadline.so. 5
/usr/lib/libreadline.so. 5.1
/usr/local/src/Python-2.4.4/Doc/lib/libreadline.tex

Any better way to check?

--
Rahul
Jun 27 '08 #3
Rahul schrieb:
"Diez B. Roggisch" <de***@nospam.w eb.dewrote in
news:67******** *****@mid.uni-berlin.de:
>Is libreadline installed?

Thanks for your help Diez. I did a locate and found:

/usr/lib/libreadline.a
/usr/lib/libreadline.so
/usr/lib/libreadline.so. 5
/usr/lib/libreadline.so. 5.1
/usr/local/src/Python-2.4.4/Doc/lib/libreadline.tex

Any better way to check?
The question is if python is build with readline support. Did the python
version work before, and somehow got messed up, or did you build it
yourself and it never actually worked? If it's the latter case, you
might try & install a possible readline-dev-package (or whatever it is
called on red hat), and build again, cautiously monitoring if readline
is picked up from the build-process.

Diez
Jun 27 '08 #4
"Diez B. Roggisch" <de***@nospam.w eb.dewrote in news:67pq47F2pl mb8U1
@mid.uni-berlin.de:
>
The question is if python is build with readline support. Did the python
version work before, and somehow got messed up, or did you build it
yourself and it never actually worked?
I suspect we upgraded our RHEL and that broke it. Has never worked after.

Is there a way to extract what cmd-line options my python was compiled with?
Might be worth it before I go the long-painful route of re-installing.
--
Rahul
Jun 27 '08 #5

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

Similar topics

3
2080
by: T.T.H. | last post by:
Hi I am coding a C++ COM object which I want to access in Python. For that I do have some detail questions and need help since I am not that familiar with the documentation itself of Python and win32com yet. 1. How do I know that...
699
33349
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro capabilities, unfortunately. I'd like to know if it may be possible to add a powerful macro system to Python, while keeping its amazing syntax, and if it...
7
3547
by: Michele Simionato | last post by:
So far, I have not installed Prothon, nor I have experience with Io, Self or other prototype-based languages. Still, from the discussion on the mailing list, I have got the strong impression that you do not actually need to fork Python in order to implement prototypes. It seems to me that Python metaclasses + descriptors are more than powerful...
35
2840
by: Michel Sanner | last post by:
Hello, One of the greatest feature of Python in my opinion is the way the interpreter can be used to integrate a wide variety of software packages by dynamically linking them. This approach has been extremely successful for us so far but now I run into a license nightmare. Some the libraries we wrapped using SWIG are under GPL but the...
2
2215
by: kyosohma | last post by:
Hi, I was trying to hook into Google Calendar today using their gdata module for Python, but I can't seem to get Python to work with it. When I run the setup.py from the command line, I get the following: Traceback (most recent call last): File "J:\Python\Lib\site-packages\gdata\setup.py", line 39, in ? package_dir =...
0
7499
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7689
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7456
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6022
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3490
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3470
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1919
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1044
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
743
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.