我有一个程序使用Dweepy(一个Python模块来使用dweet.io服务),它不能出于某种原因运行流函数(listen_for_dweets_from)。
代码:
collabIncomingThread = threading.Thread(None, self.listenForCollabCommands, daemon=True)
collabIncomingThread.start()
def listenForCollabCommands(self):
print("Getting dweets...")
for dweet in dweepy.listen_for_dweets_from('reggie-next-codes-' + shareid):
print(dweet)
contentcourse = dweet['content']
code = contentcourse['code']
#sender = contentcourse['player']
print("IN: " + code)
#if sender != myname:
mainWindow.HandleCollaborationLang(str(code))
当它运行时,它最终打印出这些东西: http://pastebin.com/MJdRriyH(粘贴是无限的,我无法将其全部格式化为SO)
我很确定它与线程有什么关系,但我不确定。有谁知道吗?