##// END OF EJS Templates
Try to import pyreadline on win32
vivainio -
Show More
@@ -6,7 +6,7 b' Requires Python 2.3 or newer.'
6 6
7 7 This file contains all the classes and helper functions specific to IPython.
8 8
9 $Id: iplib.py 1097 2006-01-28 20:22:13Z vivainio $
9 $Id: iplib.py 1098 2006-01-29 16:14:21Z vivainio $
10 10 """
11 11
12 12 #*****************************************************************************
@@ -1170,14 +1170,28 b' want to merge them back into the new files.""" % locals()'
1170 1170
1171 1171 def init_readline(self):
1172 1172 """Command history completion/saving/reloading."""
1173
1174 using_pyreadline = False
1175 if sys.platform == 'win32':
1176 try:
1177 import pyreadline as readline
1178 using_pyrl = True
1179 print "Using the new pyreadline (thanks for participating in the testing!)"
1180 except ImportError:
1181 print "The IPython team recommends the new pyreadline for Windows use, it wasn't found."
1182 print "Try installing it with 'easy_install pyreadline (ctypes is required) or"
1183 print "svn co http://ipython.scipy.org/svn/ipython/pyreadline/trunk pyreadline"
1184 print "Trying 'old' windows readline."
1185
1186
1173 1187 try:
1174 import readline
1188 if not using_pyreadline:
1189 import readline
1175 1190 except ImportError:
1176 1191 self.has_readline = 0
1177 1192 self.readline = None
1178 1193 # no point in bugging windows users with this every time:
1179 if os.name == 'posix':
1180 warn('Readline services not available on this platform.')
1194 warn('Readline services not available on this platform.')
1181 1195 else:
1182 1196 import atexit
1183 1197 from IPython.completer import IPCompleter
@@ -1,3 +1,7 b''
1 2006-01-29 Ville Vainio <vivainio@gmail.com>
2
3 * iplib.py: Try to import pyreadline on Windows.
4
1 5 2006-01-27 Ville Vainio <vivainio@gmail.com>
2 6
3 7 * iplib.py: Expose ipapi as _ip in builtin namespace.
General Comments 0
You need to be logged in to leave comments. Login now