我运行在Amazon EC2上的Ubuntu 12.04的xvfb的服务器上执行以下PyQt的应用程序,我得到正确的输出中从Qt应用程序,但是当应用程序完成后我总是得到上述错误。为什么我得到这个错误?我认为这可能是因为xvfb服务器没有正确终止,但我不确定。的Xvfb IO错误:客户端打死
import sys
from PyQt4.QtGui import *
from PyQt4.QtCore import *
from PyQt4.QtWebKit import *
from xvfbwrapper import Xvfb
args = {"nolisten":"tcp"}
vdisplay = Xvfb(**args)
vdisplay.start()
app = QApplication(sys.argv)
def update():
print "upd"
t = QTimer()
t.start(500)
t.timeout.connect(update)
stopTimer = QTimer(timeout=app.quit,singleShot=True)
stopTimer.start(4000)
app.exec_()
print "done with app"
vdisplay.stop()
睡了一个短终止后的时间也解析了直接使用xvfb-run运行时类似的错误消息(尽管我复制并修改了xvfb-run来这样做) – Gnat