def list_devices(verbose): all_devices = DeviceSet() all_devices.parse_xml(os.path.join(os.path.dirname(__file__), "..", "devices", "devices.xml")) print "Available Devices:" if verbose == 1: all_devices.show_id() elif verbose == 2: all_devices.show()