Skip to content

invisibleroads/invisibleroads-macros-process

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Shortcut Functions for Process Operations

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages