Patch #1472854: make the rlcompleter.Completer class usable on non-

UNIX platforms.
This commit is contained in:
Georg Brandl 2006-04-30 18:14:54 +00:00
parent 208badda27
commit 3583cff5a9
4 changed files with 19 additions and 14 deletions

View file

@ -39,7 +39,6 @@ used, and this module (and the readline module) are silently inactive.
"""
import readline
import __builtin__
import __main__
@ -147,4 +146,9 @@ def get_class_members(klass):
ret = ret + get_class_members(base)
return ret
readline.set_completer(Completer().complete)
try:
import readline
except ImportError:
pass
else:
readline.set_completer(Completer().complete)