http://stackoverflow.com/questions/17074177/how-to-debug-python-cli-that-takes-stdin