forked from lhl/pensieve
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pensieve.py
55 lines (41 loc) · 1.19 KB
/
pensieve.py
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#/usr/bin/env python
from PyQt5 import QtWidgets
import os
import sys
from threading import Thread
from tornado.ioloop import *
# pyssb
sys.path.insert(0, '%s/pyssb/pyssb/' % os.path.dirname(os.path.realpath(__file__)))
from pyssb import *
# pensieve_tornado
from pensieve_tornado.app import *
ssb_config = {'name':'evernote','title':'Evernote','url':'https://www.evernote.com/Home.action'}
class PensieveSSB(SSBWindow):
def __init__(self, ssb_config):
pass
def pt():
PORT=11111
Pensieve().listen(PORT)
IOLoop.instance().start()
if __name__ == "__main__":
Thread(target=pt).start()
app = QtWidgets.QApplication([])
ssb = SSBWindow(ssb_config)
ssb.show()
sys.exit(app.exec_())
'''
class MainWindow(QtGui.QMainWindow):
def __init__(self):
QtGui.QMainWindow.__init__(self)
self.label = QtGui.QLabel("Label!")
self.setCentralWidget(self.label)
def closeEvent(self, event):
IOLoop.instance().stop()
@gen.coroutine
def update_label(self):
label = yield AsyncHTTPClient().fetch(URL)
if label.error:
self.label.setText("Error!")
else:
self.label.setText(label.body.decode('utf-8'))
'''