473,568 Members | 3,014 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 2689
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
33516
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
3551
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
2842
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
7605
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7917
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
7665
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
7962
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5217
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3631
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2105
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
1207
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
933
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.