=== modified file 'IPython/utils/rlineimpl.py' --- IPython/utils/rlineimpl.py 2009-07-02 17:26:16 +0000 +++ IPython/utils/rlineimpl.py 2009-08-19 21:56:50 +0000 @@ -33,12 +33,17 @@ uses_libedit = False if sys.platform == 'darwin' and have_readline: import commands - (status, result) = commands.getstatusoutput( "otool -L %s | grep libedit" % _rl.__file__ ) - if status == 0 and len(result) > 0: - # we are bound to libedit - new in Leopard - _rl.parse_and_bind("bind ^I rl_complete") - print "Leopard libedit detected." - uses_libedit = True + try: + (status, result) = commands.getstatusoutput( "otool -L %s | grep libedit" % _rl.__file__ ) + except IOError: + # Something interfered with reading the output. Probably PyQt4. + pass + else: + if status == 0 and len(result) > 0: + # we are bound to libedit - new in Leopard + _rl.parse_and_bind("bind ^I rl_complete") + print "Leopard libedit detected." + uses_libedit = True # the clear_history() function was only introduced in Python 2.4 and is