Skip to content

Instantly share code, notes, and snippets.

View dariussullivan's full-sized avatar

Darius Sullivan dariussullivan

View GitHub Profile
@dariussullivan
dariussullivan / test_traitsui_quamash.py
Created January 18, 2019 15:58 — forked from danieljfarrell/test_traitsui_quamash.py
An example of asynchronous programming with TraitsUI using QT5 backend with Quamash event loop to work with asyncio.
"""
This code was helpful,
https://stackoverflow.com/questions/32141623/pyqt5-and-asyncio-yield-from-never-finishes
"""
import os
import sys
import time
import quamash
import asyncio
@dariussullivan
dariussullivan / b79021d41025.py
Last active July 6, 2017 01:38
Small demonstration of secs equipment server. Uses secsgem and twisted.
from twisted.internet import reactor, protocol, endpoints
from twisted.protocols import basic
from twisted.internet.defer import Deferred, inlineCallbacks, returnValue
from twisted.internet import task
from twisted.python import log
# log errors inside reactor to stdout
from twisted.python.log import startLogging
from sys import stdout
startLogging(stdout)