如何使用Ipython嵌入qt-console

时间:2012-08-08 10:13:51

标签: ipython

每当我尝试使用ipython和qt作为gui支持时,它就会给我这个:

enter code here $ ipython --gui=qt
                  Python 2.7.3 (default, Apr 20 2012, 22:39:59) 
 Type "copyright", "credits" or "license" for more information.

 IPython 0.12.1 -- An enhanced Interactive Python.
 ?         -> Introduction and overview of IPython's features.
 %quickref -> Quick reference.
 help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: Got bus address:  "unix:abstract=/tmp/dbus-   q      1DAvsew5j,guid=a3ed4bb7c5723eeff9aaed690000006e" 
Connected to accessibility bus at:  "unix:abstract=/tmp/dbus-  q1DAvsew5j,guid=a3ed4bb7c5723eeff9aaed690000006e" 
  Registered DEC:  true 
  Registered event listener change listener:  true 
  Registered event listener change listener:  true 
  Registered event listener change listener:  true 
  Registered event listener change listener:  true 
  Registered event listener change listener:  true 
  Registered event listener change listener:  true 
  Registered event listener change listener:  true 

我的问题是:

  1. 这是什么以及为什么它会在键盘中断之前停止?

  2. 如何在ipython中嵌入qt-console?

2 个答案:

答案 0 :(得分:2)

这个问题刚刚开始发生在我身上。我正在运行Ubuntu 12.04。删除QT辅助功能包(qt-at-spi)为我解决了这个问题。

这是从终端运行的命令。

sudo apt-get remove --purge qt-at-spi

来源: http://blog.koppi.me/2012/01/howto-fix-sni-qt19799-warn-024248-774-void-statusnotifieritemfactoryconnecttosnw-invalid-interface-to-snw_service-error-message-on-ubuntu-11-10/

答案 1 :(得分:0)

理论上你可以通过设置环境变量QT_ACCESSIBILITY

来完成相同的事情(停止QT AT API消息)而不用清除包

即添加

export QT_ACCESSIBILITY=0

到你的shell和/或系统启动(比如〜/ .bashrc)

您可以在此处查看qt辅助功能包的自述文件

的/ usr /共享/ DOC / QT-AT-SPI /自述