activating history in Python 2.3.4

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Riko Wichmann

    #1

    activating history in Python 2.3.4

    dear all,

    lately, I installed Python 2.3.4 from sources (after having 2.2 for some
    time).
    However, running Python interactively, I cannot recall the histroy of
    command with cursor-up or down anymore (just get ^[[A for example).
    As far as I could find out, it has something to do with GNU readline.
    When I do
    [color=blue][color=green][color=darkred]
    >>> import readline[/color][/color][/color]
    Traceback (most recent call last):
    File "<stdin>", line 1, in ?
    ImportError: No module named readline

    things seem to be clear. However, since my old Python 2.2 seems to have
    readline it means, gnu readline is in principle available.

    How can I activate history, or where do I get the readline module from?

    Thanks and cheers,

    Riko
  • Gerhard Haering

    #2
    Re: activating history in Python 2.3.4

    On Fri, Nov 19, 2004 at 10:03:47AM +0100, Riko Wichmann wrote:[color=blue]
    > [Python compiled from source does not have readline support][/color]

    Make sure that the readline development headers and libraries are
    installed on your system.

    On Debian Linux, for example they're called libreadline4-dev. On
    RPM-based Linux distributions, they're called libreadline-devel or
    similarly.

    -- Gerhard

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.4 (GNU/Linux)

    iD8DBQFBnb88dIO 4ozGCH14RAjiAAK C/bzA28Qf5bTlzchP 6Ttcwd+ibCgCeLl A+
    69XIc40djhX064x B/cz5x7o=
    =b7ld
    -----END PGP SIGNATURE-----

    Comment

    • Riko Wichmann

      #3
      Re: activating history in Python 2.3.4

      Gerhard Haering wrote:[color=blue]
      > On Fri, Nov 19, 2004 at 10:03:47AM +0100, Riko Wichmann wrote:
      >[color=green]
      >>[Python compiled from source does not have readline support][/color]
      >
      >
      > Make sure that the readline development headers and libraries are
      > installed on your system.
      >
      > On Debian Linux, for example they're called libreadline4-dev. On
      > RPM-based Linux distributions, they're called libreadline-devel or
      > similarly.[/color]

      well I installed readline5.0 from source, so all necessay headers are
      there. but still, no module named readline ....

      I configure python explicitly with --with-readline and everything seems
      to be fine. I find in the config.log:

      ac_cv_lib_readl ine_rl_completi on_matches=yes
      ac_cv_lib_readl ine_rl_pre_inpu t_hook=yes

      and no other complains in connection with readline. However, looking in
      the lib/python2.3/lib-dynload after make, make install, there is only a
      readline_failed .so and an xreadlines.so ... ??

      Any other ideas would be greatly appreciated!

      Cheers,

      Riko

      Comment

      • Andrew James

        #4
        Re: activating history in Python 2.3.4

        Gerhard,
        I wonder if it's your terminal that is causing the problems? If you're
        using xterm, try switching to aterm, konsole or gnome-terminal and see
        if the behaviour is the same.

        Andrew

        On Fri, 2004-11-19 at 13:41 +0100, Riko Wichmann wrote:[color=blue]
        > Gerhard Haering wrote:[color=green]
        > > On Fri, Nov 19, 2004 at 10:03:47AM +0100, Riko Wichmann wrote:
        > >[color=darkred]
        > >>[Python compiled from source does not have readline support][/color]
        > >
        > >
        > > Make sure that the readline development headers and libraries are
        > > installed on your system.
        > >
        > > On Debian Linux, for example they're called libreadline4-dev. On
        > > RPM-based Linux distributions, they're called libreadline-devel or
        > > similarly.[/color]
        >
        > well I installed readline5.0 from source, so all necessay headers are
        > there. but still, no module named readline ....
        >
        > I configure python explicitly with --with-readline and everything seems
        > to be fine. I find in the config.log:
        >
        > ac_cv_lib_readl ine_rl_completi on_matches=yes
        > ac_cv_lib_readl ine_rl_pre_inpu t_hook=yes
        >
        > and no other complains in connection with readline. However, looking in
        > the lib/python2.3/lib-dynload after make, make install, there is only a
        > readline_failed .so and an xreadlines.so ... ??
        >
        > Any other ideas would be greatly appreciated!
        >
        > Cheers,
        >
        > Riko[/color]
        --
        Andrew James <drew@gremlinho sting.com>

        Comment

        • Riko Wichmann

          #5
          Re: activating history in Python 2.3.4

          Hi Andrew,

          nope, it's not the terminal, xterm, konsole and gnome-terminal behave
          the same.

          - Riko

          Andrew James wrote:[color=blue]
          > Gerhard,
          > I wonder if it's your terminal that is causing the problems? If you're
          > using xterm, try switching to aterm, konsole or gnome-terminal and see
          > if the behaviour is the same.
          >
          > Andrew[/color]

          Comment

          Working...