Last active
May 6, 2016 07:50
-
-
Save KennethNielsen/a89564d61b5064a34871731a13a4984d to your computer and use it in GitHub Desktop.
Revisions
-
Kenneth Nielsen renamed this gist
May 6, 2016 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
Kenneth Nielsen created this gist
May 6, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ from __future__ import print_function import inspect import soco zone = soco.discovery.any_soco() # Get the base service class service_class = soco.services.Service # Loop over all members in soco.services ... for _, member in inspect.getmembers(soco.services): # ... and skip everything that isn't and class and a subclass of Service if not (inspect.isclass(member) and issubclass(member, service_class)): continue # Instantiate the service and print out all its actions service_instance = member(zone) for action, in_args, out_args in service_instance.iter_actions(): print(action, in_args, out_args)