Skip to content

waszil/subalive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

subalive

Subprocess handling with alive keeping for python

With this package you can start a python script in a new subprocess from a master script and it makes sure that if the master exits/terminates, the slave will detect it and quit.

Just instantiate the two classes in your master and slave script, and that's it.

Works with python 3.6

Example

master

from subalive import SubAliveMaster

# start subprocess with alive keeping
SubAliveMaster(<path to your slave script>)

# do your stuff
# ...

slave

from subalive import SubAliveSlave

# start alive checking
SubAliveSlave()

# do your stuff
# ...

Usage

>> python master.py

About

Subprocess handling with alive keeping for python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages