You'll need dbus running. In a console:
python server.py
In another console:
python client.py
In server.py
line 32, replace:
bus_name = dbus.service.BusName('org.example.Ui', bus)
With:
dbus.service.BusName('org.example.Ui', bus)
I'm guessing BusName initializes an object that in its construction has the side effect of publishing a service on dbus, and if it's not assigned to anything, the python interpreter discards it, and thus destroys it, which probably causes the dbus service to disappear. Bonkers.