Shortcut functions for process operations
Project description
Shortcut Functions for Process Operations
Install
pip install invisibleroads-macros-process
Use
import logging
from invisibleroads_macros_process import LoggableProcess, StoppableProcess
logging.basicConfig(level=logging.DEBUG)
def f():
print('whee')
process = LoggableProcess(name='MY-LOGGABLE', target=f, daemon=True)
process.start()
process = StoppableProcess(name='MY-STOPPABLE', target=f, daemon=True)
process.start()
process.stop()
Test
git clone https://github.com/invisibleroads/invisibleroads-macros-process
cd invisibleroads-macros-process
pip install -e .[test]
pytest --cov=invisibleroads_macros_process --cov-report term-missing tests
0.2
- Make it possible to specify Process class such as when using a multiprocessing context
- Replace SIGTERM with SIGINT
0.1
- Add LoggableProcess, StoppableProcess
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file invisibleroads-macros-process-0.2.0.tar.gz
.
File metadata
- Download URL: invisibleroads-macros-process-0.2.0.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a88a53a5c59fd194844fc3a99f976700ff224ed942de3f73418c86bb80b0dfe5 |
|
MD5 | e2d94e77edf83508231ec470a673cbcd |
|
BLAKE2b-256 | f27f79271af49f86f4af4c96d08630fc297104b332c998bc40fb2dccd4aaea40 |
File details
Details for the file invisibleroads_macros_process-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: invisibleroads_macros_process-0.2.0-py3-none-any.whl
- Upload date:
- Size: 2.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | af046268a18dc1cdfc3c4d277867ad71577fd5e026281be0809773f9f43fcd5b |
|
MD5 | 47c0b9b8fd1a4e8eab039c5baeccf87e |
|
BLAKE2b-256 | bd9386fdb509ea6fe75c25af954d7efe2fd2f121c47725b59b026df6e4617688 |