More on the Python cmd module - from pymotw3
cmd — Line-oriented Command Processors
Here is a link that explains some stuff that I apparently missed earlier, but it could also be that, since this is for Python 3, I could have skipped it, as, at the time, I needed to support Python 2 as well.
Anyway, the cmd — Line-oriented Command Processors has some really good information. Especially on the command completion stuff (or it just may be that it works so much better in Python 3 than 2. It seems to work exactly the way it should in 3!)
Anyway, didn't want to lose the link, so I'm putting it here.