A year ago I've started to play with unix pipes and subprocesses in python and this make me realize that I have a lot of really small shell script that I always lose and rewrite because I do not take care of those small snippets. And here was my new goal: avoid bash scripts. Everything must be python.
So I've started to write chut. The library is now stable enough. I use it every days.
The main benefits are:
- It use docopt so you dont have to take care of command line documentation / parsing.
- You can have more than one shell script in a single python scripts. A function using a @console_script is a entry point.
- You have some helpers to implements commons options such as -v,--verbose
- Some magics allow you to import everything you need: from chut import openvpn, route, wget
- Easy to deploy: Just scp a script to another server and it'll work
- run with python2.6+ and python3.x