##// END OF EJS Templates
allow IPython.zmq.completer to be imported without readline...
MinRK -
Show More
@@ -5,7 +5,10 b''
5 from __future__ import print_function
5 from __future__ import print_function
6
6
7 import itertools
7 import itertools
8 import readline
8 try:
9 import readline
10 except ImportError:
11 readline = None
9 import rlcompleter
12 import rlcompleter
10 import time
13 import time
11
14
@@ -37,8 +40,9 b' class ClientCompleter(object):'
37 and then return them for each value of state."""
40 and then return them for each value of state."""
38
41
39 def __init__(self, client, session, socket):
42 def __init__(self, client, session, socket):
40 # ugly, but we get called asynchronously and need access to some
43 # ugly, but we get called asynchronously and need access to some
41 # client state, like backgrounded code
44 # client state, like backgrounded code
45 assert readline is not None, "ClientCompleter depends on readline"
42 self.client = client
46 self.client = client
43 self.session = session
47 self.session = session
44 self.socket = socket
48 self.socket = socket
General Comments 0
You need to be logged in to leave comments. Login now