wait function used to wait event happens
Project description
changelist
- 1.1.2, fix readme
- 1.1.1, update type hint
- 1.1.0, add wait_for
- 1.0.0, first release
feedback
- send email to dvdface@gmail.com
- visit https://github.com/dvdface/waitutil
how to install
pip install wait-util
known issues
None
test info
Name Stmts Miss Cover
--------------------------------------
wait\__init__.py 2 0 100%
wait\wait.py 65 6 91%
--------------------------------------
TOTAL 67 6 91%
how to use
-
install package
run
pip install wait-util
to install wait package -
use wait_until_change/wait_until_no_change
from wait import wait_until_change, wait_until_no_change def demo(): return 1 wait_until_change(demo, interval=1, timeout=5) wait_until_no_change(demo, interval=1, timeout=5)
-
use wait_for_true/wait_for_false
from wait import wait_for_true, wait_for_false def demo(): return True wait_for_true(demo, interval=1, timeout=5) wait_for_false(demo, interval=1, timeout=5)
-
use wait_for
from wait import wait_for def func(): import random return random.randint(0, 1) wait_for(func, 0)
how to contribute
- visit https://github.com/dvdface/waitutil
- submit your contribute
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
wait-util-1.1.2.tar.gz
(2.9 kB
view details)
File details
Details for the file wait-util-1.1.2.tar.gz
.
File metadata
- Download URL: wait-util-1.1.2.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52f032a281643997a897ffd5bc042c3150a42592dac5e39743aa073ceb4e4ea4 |
|
MD5 | 4062fb0de4e29a1970f9295541f5c346 |
|
BLAKE2b-256 | 6d5239aa071938ce20a1b573ad4e5e1a815cf99b9c945d71390a289706ca398e |