hi,
ive got these two functions:
@inlineCallbacks
def getUserList():
reload_interval = yield getReloadInterval()
print "222", reload_interval
target_url = host + "/?ReloaderUserOnline"
body = urllib.urlencode({"reloadsequenz":reload_interval})
#body = '\r\n'
#headers
hi,
why does the code below print "testing..." but not "123" 5 seconds after
the application started?
import sys
from PyQt5 import QtWidgets
from untitled import Ui_MainWindow
#from webchat import get_main_page
class Main(QtWidgets.QMainWindow):
def __init__(self):
QtWidgets.QMa
hi,
ive got some twisted code that runs on its own
and some python code that also runs on its own,
now i would like to combine the two, so i added:
if __name__ == '__main__':
app = QtWidgets.QApplication(sys.argv) # your code to init QtCore
import qt5reactor
qt5reactor.install()
On Wed, 2016-06-29 at 16:01 -0700, Glyph wrote:
>
> > On Jun 29, 2016, at 15:39, steven meier
> > wrote:
> >
> >
> > here is my code:
> > when importing get_main_page i get the error above...
> >
> > import sys
> > from PyQt5 import Q
> You have to put the qt5reactor installation at the very top of the
> very first file that you run. What's happened here is that you
> imported some Twisted code that did 'from twisted.internet import
> reactor' at the top level, which unfortunately far too many modules
> do, before you installe
python main_code.py
Gtk-Message: Failed to load module "canberra-gtk-module"
testing...
[Failure instance: Traceback: : global name
'reactor' is not defined
/home/julius/.local/lib/python2.7/site-packages/twisted/internet/tcp.py:293:connectionLost
/home/julius/.local/lib/python2.7/site-packages/tw
hi,
i ran into this issue, i can run the code on its own "python
working_code.py", but i cant import it...how do you fit the reactor in
this scenario?
python main_code.py
Unhandled error in Deferred:
Traceback (most recent call last):
File
"/home/julius/.local/lib
On Fri, 2016-07-29 at 23:11 +0400, meejah wrote:
> I think the "recommended" way to get access to a reactor instance is to
> pass it in to methods that require it.
>
> While this can sometimes seem tedious it a) helps testing (because now
> you can easily pass a fake reactor object like Clock or a
hi,
after my last question which was answered with:
...the reactor should be passed in by the user...
i ran into getPage(), the
file: ./lib/python2.7/site-packages/twisted/web/client.py
which contains getPage() imports the reactor at the top.
it can be easily changed to add a argument to getPag