diff --git a/rshell/main.py b/rshell/main.py index 478c0b5..eff7cf4 100755 --- a/rshell/main.py +++ b/rshell/main.py @@ -64,7 +64,7 @@ import readline import rlcompleter -if 'libedit' in readline.__doc__: +if readline.__doc__ and 'libedit' in readline.__doc__: readline.parse_and_bind ("bind ^I rl_complete") BROKEN_READLINE = True else: diff --git a/setup.py b/setup.py index 5cbb512..a39a31a 100644 --- a/setup.py +++ b/setup.py @@ -41,7 +41,9 @@ install_requires=[ 'pyserial', 'pyudev >= 0.16', - ], + ] + ([ + 'pyreadline', + ] if 'win' in sys.platform else []), entry_points = { 'console_scripts': [ 'pyboard=rshell.pyboard:main',