main.py: introduce

This is a skeleton of a main that I think should be pretty
unobjectionable.

I'm going to create a pull request with this and maybe it will be
accepted.