The Python interactive interpreter has no command history

Discussion in 'Python' started by ThomasC, Feb 15, 2007.

  1. ThomasC

    ThomasC Guest

    Hello,

    How to configure Python2.5's interactive interpreter to get command
    history ?

    I always got ^[[A and ^[[B .

    Thank you !!

    Thomas#
     
    ThomasC, Feb 15, 2007
    #1
    1. Advertising

  2. Hi,

    You need to have readline installed.

    Laurent

    ThomasC wrote:

    > Hello,
    >
    > How to configure Python2.5's interactive interpreter to get command
    > history ?
    >
    > I always got ^[[A and ^[[B .
    >
    > Thank you !!
    >
    > Thomas#
     
    Laurent Rahuel, Feb 15, 2007
    #2
    1. Advertising

  3. > Hello,
    >
    > How to configure Python2.5's interactive interpreter to get command
    > history ?
    >
    > I always got ^[[A and ^[[B .
    >


    Are you using Ubuntu? The last comes with 2.4.x and 2.5. This only
    occurs on 2.5. This happens when you compile Python with libreadline
    installed, AFAIK.
    FIll a bug in the Ubuntu launchpad. You can install libreadline (and
    build-essential), download the 2.5 source and compile yourself.

    --
    EduardoOPadoan (eopadoan->altavix::com)
    Bookmarks: http://del.icio.us/edcrypt
     
    Eduardo \EdCrypt\ O. Padoan, Feb 15, 2007
    #3
  4. Il Thu, 15 Feb 2007 15:14:00 -0200, Eduardo "EdCrypt" O. Padoan ha scritto:

    > Are you using Ubuntu? The last comes with 2.4.x and 2.5. This only
    > occurs on 2.5. This happens when you compile Python with libreadline
    > installed, AFAIK.


    I'm on Edgy and command history works well both with 2.4 and 2.5 with my
    config. If it's really an Edgy glitch, it must be configuration-related!

    --
    Alan Franzoni <>
    -
    Togli .xyz dalla mia email per contattarmi.
    Remove .xyz from my address in order to contact me.
    -
    GPG Key Fingerprint (Key ID = FE068F3E):
    5C77 9DC3 BD5B 3A28 E7BC 921A 0255 42AA FE06 8F3E
     
    Alan Franzoni, Feb 16, 2007
    #4
  5. ThomasC

    ThomasC Guest

    Thank you a lot!

    I will try add readline library in my system.
    Thank you.

    On 2¤ë16¤é, ¤W¤È1®É13¤À, Laurent Rahuel <> wrote:
    > Hi,
    >
    > You need to have readline installed.
    >
    > Laurent
    >
    > ThomasCwrote:
     
    ThomasC, Feb 26, 2007
    #5
  6. ThomasC

    Paul Boddie Guest

    On 16 Feb, 11:40, Alan Franzoni
    <> wrote:
    > Il Thu, 15 Feb 2007 15:14:00 -0200, Eduardo "EdCrypt" O. Padoan ha scritto:
    >
    > > Are you using Ubuntu? The last comes with 2.4.x and 2.5. This only
    > > occurs on 2.5. This happens when you compile Python with libreadline
    > > installed, AFAIK.

    >
    > I'm on Edgy and command history works well both with 2.4 and 2.5 with my
    > config. If it's really an Edgy glitch, it must be configuration-related!


    I guess it depends on how one is building the software. According to
    the package information [1] libreadline5 is stated as a dependency, so
    if one uses the Debian tools to make a package from the sources (plus
    the diffs), one should get complaints about missing dependencies
    rather than inadvertently getting an installable version of Python
    with broken command history support.

    Paul

    [1] http://packages.ubuntu.com/edgy/python/python2.5
     
    Paul Boddie, Feb 26, 2007
    #6
  7. ThomasC

    Guest

    , Feb 26, 2007
    #7
    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. Christoph Becker-Freyseng

    dumping command-history in python interactive mode

    Christoph Becker-Freyseng, Jul 17, 2003, in forum: Python
    Replies:
    3
    Views:
    406
    Pedro Werneck
    Jul 18, 2003
  2. POYEN OP Olivier (DCL)

    RE: dumping command-history in python interactive mode

    POYEN OP Olivier (DCL), Jul 18, 2003, in forum: Python
    Replies:
    0
    Views:
    401
    POYEN OP Olivier (DCL)
    Jul 18, 2003
  3. Ashot
    Replies:
    22
    Views:
    4,236
    Fernando Perez
    Feb 8, 2005
  4. Sakcee
    Replies:
    1
    Views:
    447
    Patrick Bothe
    Apr 26, 2006
  5. Nikhil
    Replies:
    4
    Views:
    362
    Martin Marcher
    May 20, 2008
Loading...

Share This Page