Fix for Python client in custom PubSub example

The JS client was correct but the Python-only client did not work with the supplied server. Corrected minor issues and client now works correctly.