Get query_usno working on Py3

Changes to get it working on Py3

Py3 seems to be more picky about some tabs/spaces issues, hence the large number of whitespace changes.