diff options
author | Georg Brandl <georg@python.org> | 2006-04-30 18:14:54 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2006-04-30 18:14:54 (GMT) |
commit | 3583cff5a9d55b9c1bc17b5d82670e5e6b0fc10d (patch) | |
tree | 69e44c0965203d70cddbba81e87fe5efe14475a9 /Lib/rlcompleter.py | |
parent | 208badda275a7aaf722a8db87297637e161fa7aa (diff) | |
download | cpython-3583cff5a9d55b9c1bc17b5d82670e5e6b0fc10d.zip cpython-3583cff5a9d55b9c1bc17b5d82670e5e6b0fc10d.tar.gz cpython-3583cff5a9d55b9c1bc17b5d82670e5e6b0fc10d.tar.bz2 |
Patch #1472854: make the rlcompleter.Completer class usable on non-
UNIX platforms.
Diffstat (limited to 'Lib/rlcompleter.py')
-rw-r--r-- | Lib/rlcompleter.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/rlcompleter.py b/Lib/rlcompleter.py index 1d29167..dab0cb9 100644 --- a/Lib/rlcompleter.py +++ b/Lib/rlcompleter.py @@ -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) |