python command mis-interprets arrow keys

Discussion in 'Python' started by Rahul, Apr 29, 2008.

  1. Rahul

    Rahul Guest

    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
     
    Rahul, Apr 29, 2008
    #1
    1. Advertising

  2. 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
     
    Diez B. Roggisch, Apr 30, 2008
    #2
    1. Advertising

  3. Rahul

    Rahul Guest

    "Diez B. Roggisch" <> wrote in
    news:-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
     
    Rahul, Apr 30, 2008
    #3
  4. Rahul schrieb:
    > "Diez B. Roggisch" <> wrote in
    > news:-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
     
    Diez B. Roggisch, Apr 30, 2008
    #4
  5. Rahul

    Rahul Guest

    "Diez B. Roggisch" <> wrote 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
     
    Rahul, Apr 30, 2008
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mike Rennie

    how python interprets re matches

    Mike Rennie, Dec 15, 2005, in forum: Python
    Replies:
    0
    Views:
    264
    Mike Rennie
    Dec 15, 2005
  2. Vidar Gundersen
    Replies:
    1
    Views:
    809
  3. jitrowia
    Replies:
    2
    Views:
    400
    Dennis Lee Bieber
    Jan 26, 2008
  4. VancouverMike
    Replies:
    0
    Views:
    616
    VancouverMike
    Apr 11, 2008
  5. Ed Prochak
    Replies:
    0
    Views:
    612
    Ed Prochak
    Apr 10, 2008
Loading...

Share This Page