On 5/10/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> [EMAIL PROTECTED]:~$ sage/sage -python
> Python 2.5.1 (r251:54863, May 10 2007, 15:24:24)
> [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import readline
> >>> readline.__file__
> '/home/boothby/sage/local/lib/python2.5/lib-dynload/readline.so'
> >>> dir(readline)
> ['__doc__', '__file__', '__name__', 'add_history', 'get_begidx', 
> 'get_completer', 'get_completer_delims', 'get_current_history_length', 
> 'get_endidx', 'get_history_item', 'get_history_length', 'get_line_buffer', 
> 'insert_text', 'parse_and_bind', 'read_history_file', 'read_init_file', 
> 'redisplay', 'remove_history_item', 'replace_history_item', 'set_completer', 
> 'set_completer_delims', 'set_history_length', 'set_startup_hook', 
> 'write_history_file']

This is odd.  Try the same thing with your system python so we can
look for differences.  Somehow it seems the readline in SAGE python is
missing two things:

clear_history
set_pre_input_hook

clear_history was added to Python ages ago:

http://osdir.com/ml/python.patches/2003-09/msg00139.html

So I'm a bit at a loss as to what the hell is going on in your box.
Let's check:

planck[~]> strings /lib/libreadline.so.5 | grep clear_history
clear_history


so we at least know that your base readline DOES have clear_history
(it would be very odd if it didn't).  Also do the same on both the
system python readline module and the SAGE one:

planck[~]> strings /usr/lib/python2.5/lib-dynload/readline.so | grep
clear_history
clear_history
clear_history
clear_history() -> None


I'm very puzzled...  Nothing in the Python changelog mentions this
function having been removed:

http://www.python.org/download/releases/2.5.1/NEWS.txt


Cheers,

f

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to