>> import time >> import pychromecast >> import zeroconf >> # Create a browser which prints the friendly name of found chromecast devices >> zconf = zeroconf.Zeroconf() >> browser = pychromecast.CastBrowser(pychromecast.SimpleCastListener(lambda uuid, service: print(browser.devices[uuid].friendly_name)), zconf) >> browser.start_discovery() >> # Shut down discovery >> pychromecast.discovery.stop_di