/usr/lib/python2.7/dist-packages/gtrial.py is in python-qt4reactor 1.0-1fakesync1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | import sys
from PyQt4 import QtGui, QtScript
from PyQt4.QtCore import QTimer, SIGNAL, QEventLoop
import qt4reactor
app = QtGui.QApplication(sys.argv)
qt4reactor.install()
from twisted.internet import reactor, task
class doNothing(object):
def __init__(self):
self.count = 0
self.running=False
def buttonClick(self):
if not self.running:
from twisted.scripts import trial
trial.run()
def run():
t=doNothing()
engine = QtScript.QScriptEngine()
button = QtGui.QPushButton()
scriptButton = engine.newQObject(button)
engine.globalObject().setProperty("button", scriptButton)
app.connect(button, SIGNAL("clicked()"), t.buttonClick)
engine.evaluate("button.text = 'Do Twisted Gui Trial'")
engine.evaluate("button.styleSheet = 'font-style: italic'")
engine.evaluate("button.show()")
app.exec_()
print 'fell off the bottom?...'
|