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 import readline
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 4 1474
On Fri, Nov 19, 2004 at 10:03:47AM +0100, Riko Wichmann wrote: [Python compiled from source does not have readline support]
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)
iD8DBQFBnb88dIO4ozGCH14RAjiAAKC/bzA28Qf5bTlzchP6Ttcwd+ibCgCeLlA+
69XIc40djhX064xB/cz5x7o=
=b7ld
-----END PGP SIGNATURE-----
Gerhard Haering wrote: On Fri, Nov 19, 2004 at 10:03:47AM +0100, Riko Wichmann wrote:
[Python compiled from source does not have readline support]
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.
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_readline_rl_completion_matches=yes
ac_cv_lib_readline_rl_pre_input_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
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: Gerhard Haering wrote: On Fri, Nov 19, 2004 at 10:03:47AM +0100, Riko Wichmann wrote:
[Python compiled from source does not have readline support]
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.
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_readline_rl_completion_matches=yes ac_cv_lib_readline_rl_pre_input_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
--
Andrew James <dr**@gremlinhosting.com>
Hi Andrew,
nope, it's not the terminal, xterm, konsole and gnome-terminal behave
the same.
- Riko
Andrew James wrote: 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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Christoph Becker-Freyseng |
last post by:
Hello,
is there a way to dump (and save) the command-history of the python
interactive mode.
Thanks,
Christoph Becker-Freyseng
|
by: Ashot |
last post by:
This is sort of both Python and Vim related (which is why I've posted to
both newsgroups).
Python related:
----------------------
I have been frustrated for quite some time with a lack of a...
|
by: Leo |
last post by:
Does someone know if there is a setting in the python Unix world to
make the command history behave as it does in the Windows intepreter?
Specifically, I like the fact that the command history...
|
by: vbfoobar |
last post by:
Hello,
My question is:
Is there an easy mean to make Python "command history"
persistent across interpreter invokations?
PS:
In the case the question above is not clear, I rephrase
it below...
|
by: Jeff Groves |
last post by:
I'm writing a launcher that should do the following:
1. Activate a .bat file to set environmental variables.
2. Start 3 programs, using said environmental variables as arguments.
However, I...
|
by: Chris Spencer |
last post by:
I'd like to make code.InteractiveConsole function just like the normal
Python console. However, when I try to use the arrow keys to recall
command history, all I get is...
|
by: Stefan Bellon |
last post by:
Hi all!
I'm embedding Python in my own C (or rather Ada, but via the C
interface) program. Everything runs fine. But I have a small question
regarding command history. Let's take the simplest...
|
by: ThomasC |
last post by:
Hello,
How to configure Python2.5's interactive interpreter to get command
history ?
I always got ^[[A and ^[[B .
Thank you !!
Thomas#
|
by: Nikhil |
last post by:
Hi,
I am using python -i, and I find it hard typing/pasting the commands
from the previous interactive shell. Basically, is there anyway that I
can preserve the history in the shell?
I guess...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |