473,503 Members | 12,003 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 2680
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.web.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.web.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.web.dewrote in news:67pq47F2plmb8U1
@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
2074
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...
699
33319
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...
7
3540
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...
35
2817
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...
2
2211
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...
0
7067
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7264
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
7316
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6975
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
7449
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...
0
4666
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1495
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 ...
1
728
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
371
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...

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.