Use a utility function to cleanly read input from the user

Yep, I can add a docstring - I'm not familiar with Sphinx apidoc so never thought about it. I don't know how well Sphinx handles it, but it's a common idiom in my experience, so I hope it manages. But if not, I'll work around it somehow.