Show More
@@ -161,17 +161,22 b' def check_for_pyzmq():' | |||||
161 | return True |
|
161 | return True | |
162 |
|
162 | |||
163 | def check_for_readline(): |
|
163 | def check_for_readline(): | |
|
164 | from distutils.version import LooseVersion | |||
164 | try: |
|
165 | try: | |
165 | import readline |
|
166 | import readline | |
166 | except ImportError: |
|
167 | except ImportError: | |
167 | try: |
|
168 | try: | |
168 | import pyreadline |
|
169 | import pyreadline | |
169 | except ImportError: |
|
170 | vs = pyreadline.release.version | |
|
171 | except (ImportError, AttributeError): | |||
170 | print_status('readline', "no (required for good interactive behavior)") |
|
172 | print_status('readline', "no (required for good interactive behavior)") | |
171 | return False |
|
173 | return False | |
172 | else: |
|
174 | if LooseVersion(vs).version >= [1,7,1]: | |
173 |
print_status('readline', "yes pyreadline-"+ |
|
175 | print_status('readline', "yes pyreadline-" + vs) | |
174 | return True |
|
176 | return True | |
|
177 | else: | |||
|
178 | print_status('readline', "no pyreadline-%s < 1.7.1" % vs) | |||
|
179 | return False | |||
175 | else: |
|
180 | else: | |
176 | print_status('readline', "yes") |
|
181 | print_status('readline', "yes") | |
177 | return True |
|
182 | return True |
General Comments 0
You need to be logged in to leave comments.
Login now