Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > The Python interactive interpreter has no command history

Reply
Thread Tools

The Python interactive interpreter has no command history

 
 
ThomasC
Guest
Posts: n/a
 
      02-15-2007
Hello,

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

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

Thank you !!

Thomas#

 
Reply With Quote
 
 
 
 
Laurent Rahuel
Guest
Posts: n/a
 
      02-15-2007
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#


 
Reply With Quote
 
 
 
 
Eduardo \EdCrypt\ O. Padoan
Guest
Posts: n/a
 
      02-15-2007
> 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
 
Reply With Quote
 
Alan Franzoni
Guest
Posts: n/a
 
      02-16-2007
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 <(E-Mail Removed)>
-
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
 
Reply With Quote
 
ThomasC
Guest
Posts: n/a
 
      02-26-2007
Thank you a lot!

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

On 2月16日, 上午1時13分, Laurent Rahuel <(E-Mail Removed)> wrote:
> Hi,
>
> You need to have readline installed.
>
> Laurent
>
> ThomasCwrote:




 
Reply With Quote
 
Paul Boddie
Guest
Posts: n/a
 
      02-26-2007
On 16 Feb, 11:40, Alan Franzoni
<(E-Mail Removed)> 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

 
Reply With Quote
 
skip@pobox.com
Guest
Posts: n/a
 
      02-26-2007

> I will try add readline library in my system.


Thomas,

Once you have it installed here's an example of how to use it for command
history:

http://www.webfast.com/~skip/python/completions.py

Skip
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to save python interpreter's command history Sakcee Python 1 04-26-2006 11:14 AM
IDLE history, Python IDE, and Interactive Python with Vim Ashot Python 22 02-08-2005 05:38 AM
linux-python arrow-key problem when in interactive interpreter Gabriel Cooper Python 1 04-27-2004 08:05 PM
dumping command-history in python interactive mode Christoph Becker-Freyseng Python 3 07-18-2003 01:47 PM
RE: dumping command-history in python interactive mode POYEN OP Olivier (DCL) Python 0 07-18-2003 08:31 AM



Advertisments