467,906 Members | 1,734 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,906 developers. It's quick & easy.

The Python interactive interpreter has no command history

Hello,

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

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

Thank you !!

Thomas#

Feb 15 '07 #1
  • viewed: 1774
Share:
6 Replies
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#
Feb 15 '07 #2
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
Feb 15 '07 #3
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 <al***************@gmail.com>
-
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
Feb 16 '07 #4
Thank you a lot!

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

On 2月16日, 上午1時13分, Laurent Rahuel <lrahuel.notg....@voila.frwrote:
Hi,

You need to have readline installed.

Laurent

ThomasCwrote:


Feb 26 '07 #5
On 16 Feb, 11:40, Alan Franzoni
<alan.franzoni_inva...@geemail.invalidwrote:
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

Feb 26 '07 #6
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
Feb 26 '07 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Avi Berkovich | last post: by
8 posts views Thread by Paul Cochrane | last post: by
30 posts views Thread by bblais | last post: by
reply views Thread by Simon Eves | last post: by
2 posts views Thread by Peng Yu | last post: by
8 posts views Thread by james.kirin39 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.