babysit

This program is added to your $PATH when you install clubsandwich. It repeatedly runs a command until you ctrl+c the babysit process.

Imagine you’re working on a flame effect for your main screen. It takes a lot of tweaking. Every time you make a change, you go to run your game:

python flamegame.py

This is annoying. With babysit, you can make it continuously relaunch every time you quit, so as soon as you exit you see the latest code running in seconds:

babysit python flamegame.py

It will keep relaunching until you ctrl+c the babysit process.

Relaunches are never more often than 5 seconds, in case you’ve got a crash-on-launch bug.