-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathtest_mbpython.py
More file actions
33 lines (27 loc) · 780 Bytes
/
test_mbpython.py
File metadata and controls
33 lines (27 loc) · 780 Bytes
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
# -*- coding:utf-8 -*-
import os
import sys
from pathlib import Path
current_folder = Path(__file__).absolute().parent
father_folder = str(current_folder.parent)
os.chdir(str(current_folder))
sys.path.append(father_folder)
from MBPython import miniblink
from config import node_path
def test():
mbpython=miniblink.Miniblink
mb=mbpython.init(node_path)
wke=mbpython(mb)
if mb==0:return
window=wke.window
callback=wke.callback
network=wke.network
webview=window.wkeCreateWebWindow(0,0,0,0,860,760)
callback.wkeOnWindowDestroy(webview)
network.wkeLoadURLW(webview,'https://www.baidu.com/')
window.wkeShowWindow(webview)
window.wkeShowWindow(webview)
window.wkeRunMessageLoop()
if __name__=='__main__':
test()
...