[IPython-dev] Win32 - call for pyreadline testing

Aldarion erendisaldarion@gmail....
Wed Apr 11 11:31:49 CDT 2007


I have modify some place as follows:
1, add 'clear_history',to __all__ dict of 
c:\python25\lib\site-packages\pyreadline\__init__.py before 
'read_history_file',
2, in file c:\python25\lib\site-packages\pyreadline\rlmain.py
add clear_history = rl.clear_history before read_history_file = 
rl.read_history_file
add a function of Class Readline before def read_history_file(self, 
filename=None):
    def clear_history(self):
        ''''Clear readline's history'''
        self._history.clear_history()
3,in file c:\python25\lib\site-packages\pyreadline\lineeditor\history.py
add a function of Class LineHistory before def read_history_file(self, 
filename=None):
    def clear_history(self):
        ''''Clear readline's history'''
        self.history = []
        self.history_cursor = 0
and the error disappears.
Chris Calloway wrote:
> Aldarion wrote:
>> Hello, I Install ipython 0.8.0 and pyreadline1.4 (win2003 python2.5)
>> However, there is still the error:
>> Maybe something is abnormal.
>> """
>> In [2]: run foo.py
>> just test
>> --------------------------------------------------------------------------- 
>>
>> <type 'exceptions.AttributeError'>        Traceback (most recent call 
>> last)
>>
>> [...snip...]
>
> Same here. I notice no _ipython is being created. And if I try to run 
> a script from the command line, it becomes an IndexError instead of an 
> AttributeError:
>
> C:\>C:\Python25\python.exe C:\Python25\scripts\ipython "\Documents and 
> Settings\cbcoasis\Desktop\test.py"
> --------------------------------------------------------------------------- 
>
> <type 'exceptions.IndexError'>            Traceback (most recent call 
> last)
>
>
> <type 'exceptions.IndexError'>: tuple index out of range
> WARNING: Failure executing file: <\Documents and 
> Settings\cbcoasis\Desktop\test.py>
> Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)]
> Type "copyright", "credits" or "license" for more information.
>
> IPython 0.8.0 -- An enhanced Interactive Python.
> ?       -> Introduction to IPython's features.
> %magic  -> Information about IPython's 'magic' % functions.
> help    -> Python's own help system.
> object? -> Details about 'object'. ?object also works, ?? prints more.
>
> In [1]:
>

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: __init__.py
Url: http://lists.ipython.scipy.org/pipermail/ipython-dev/attachments/20070412/2a82df98/attachment-0003.pl 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: history.py
Url: http://lists.ipython.scipy.org/pipermail/ipython-dev/attachments/20070412/2a82df98/attachment-0004.pl 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: rlmain.py
Url: http://lists.ipython.scipy.org/pipermail/ipython-dev/attachments/20070412/2a82df98/attachment-0005.pl 


More information about the IPython-dev mailing list