Update of /cvsroot/cvsshell/cvsshell/src
In directory usw-pr-cvs1:/tmp/cvs-serv30347
Modified Files:
interactive_app.py
Log Message:
Fixed problems with readline (handling was not correct when readline
not present)
Index: interactive_app.py
===================================================================
RCS file: /cvsroot/cvsshell/cvsshell/src/interactive_app.py,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** interactive_app.py 7 Mar 2002 00:03:23 -0000 1.1.1.1
--- interactive_app.py 7 Mar 2002 10:49:07 -0000 1.2
***************
*** 1,3 ****
! import os, readline
from app import App, AppError
--- 1,3 ----
! import os
from app import App, AppError
***************
*** 13,20 ****
"and tab completion will not be available.")
return
! readline.parse_and_bind("tab: complete")
def setHistoryFile(self,filename):
self.historyFile = filename
try:
readline.read_history_file(self.historyFile)
--- 13,24 ----
"and tab completion will not be available.")
return
! else:
! readline.parse_and_bind("tab: complete")
def setHistoryFile(self,filename):
self.historyFile = filename
+ try:
+ import readline
+ except ImportError: return
try:
readline.read_history_file(self.historyFile)
|