Created
January 4, 2014 18:06
-
-
Save otsaloma/8258322 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pyotherside | |
import threading | |
import time | |
def run(): | |
while True: | |
pyotherside.send("test-errors") | |
time.sleep(3) | |
thread = threading.Thread(target=run) | |
thread.start() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import QtQuick 2.0 | |
import Sailfish.Silica 1.0 | |
import io.thp.pyotherside 1.0 | |
ApplicationWindow { | |
initialPage: Page { | |
id: page | |
Label { | |
text: "Testing..." | |
} | |
function testErrors() { | |
console.log("starting"); | |
page.nonexistentMethod(); | |
console.log("finished"); | |
} | |
} | |
cover: null | |
Python { | |
id: py | |
Component.onCompleted: { | |
addImportPath("."); | |
importModule("test_errors", null); | |
py.setHandler("test-errors", page.testErrors); | |
} | |
onError: console.log("PYTHON ERROR: " + traceback); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment