[Pkg-bitcoin-commits] [python-quamash] 18/269: Fix README example
Jonas Smedegaard
dr at jones.dk
Fri Nov 24 11:26:11 UTC 2017
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository python-quamash.
commit 62b949714a4011a13398feeb7d3f990e3870abaa
Author: Arve Knudsen <arve.knudsen at gmail.com>
Date: Mon Jun 30 11:54:23 2014 +0200
Fix README example
---
README | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/README b/README
index cf801c5..e954f13 100644
--- a/README
+++ b/README
@@ -14,27 +14,26 @@ Usage
import time
import asyncio
import sys
- import logging
try:
from PyQt5.QtWidgets import QApplication, QMainWindow
except ImportError:
from PySide.QtGui import QApplication, QMainWindow
+
def identity(x):
time.sleep(10)
return x
+
@asyncio.coroutine
- def my_task(loop):
+ def my_task():
for x in range(5):
y = yield from loop.run_in_executor(None, identity, x)
assert x == y
loop.stop()
- logging.basicConfig(level=logging.DEBUG)
- _logger = logging.getLogger('App')
if __name__ == '__main__':
app = QApplication(sys.argv)
@@ -44,9 +43,7 @@ Usage
loop = quamash.QEventLoop(app)
with loop:
- loop.call_soon(my_task, loop)
-
- loop.run_forever()
+ loop.run_until_complete(my_task())
Name
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-bitcoin/python-quamash.git
More information about the Pkg-bitcoin-commits
mailing list