# Path: alienfx/core/prober.py
# class AlienFXProber(object):
#     
#     """ Provides facilities for probing the USB bus for supported Alien FX
#     controllers.
#     """
#         
#     @staticmethod
#     def get_controller():
#         """ Go through the supported_controllers list in AlienFXController
#         and see if any of them exist on the USB bus, Return the first one
#         found, or None if none are found.
#         """
#         for controller in AlienFXController.supported_controllers:
#             vid = controller.vendor_id
#             pid = controller.product_id
#             dev = usb.core.find(idVendor=vid, idProduct=pid)
#             if dev is not None:
#                 return controller
#         return None
# 
#     @staticmethod
#     def find_controllers(vendor):
#         """Go through the usb-bus and find devices(and most likely controllers) by vendor-id"""
#         vid = int(vendor, 16)  # Convert our given Vendor-HEX-String to an equivalent intenger
# 
#         devs = usb.core.find(find_all=1)  # All USB devices
#         devices = []  # List of found AFX-Controllers
#         for dev in devs:
#             if dev is not None:
#                 if dev.idVendor is not None:
#                     if dev.idVendor == vid:
#                         devices.append(dev)
#         if len(devices):
#             return devices
#         return None


import argparse
import logging
import pkg_resources
import alienfx.common
import alienfx.core.themefile as alienfx_themefile
import alienfx.core.logger as alienfx_logger
import alienfx.core.zonescanner as alienfx_zonescanner
import sys
from alienfx.core.prober import AlienFXProber
    try:
        argparser = argparse.ArgumentParser(
            description="""AlienFX is a utility to control the lighting effects 
                of your Alienware computer. 
                Lighting effect configurations are stored in theme files."""
        )
        argparser.add_argument(
            "-l", "--log", help="write detailed logging information to LOG"
        )
        argparser.add_argument(
            "-t", "--theme",
            help="set the lighting theme to THEME."
        )
        argparser.add_argument(
            "-s", "--list", action="store_const", const=1, 
            help="list all available lighting themes"
        )
        argparser.add_argument(
            "-v", "--version", action="version", 
            version="%(prog)s {}".format(alienfx.common.get_version())
        )
        argparser.add_argument(
            "-z", "--zonescan", action="store_true", help="starts a zonescan"
        )
        args = argparser.parse_args()
        if args.zonescan is not None:
            if args.zonescan:
                doZonescan()
                return True


# Path: alienfx/core/prober.py
# class AlienFXProber(object):
#     
#     """ Provides facilities for probing the USB bus for supported Alien FX
#     controllers.
#     """
#         
#     @staticmethod
#     def get_controller():
#         """ Go through the supported_controllers list in AlienFXController
#         and see if any of them exist on the USB bus, Return the first one
#         found, or None if none are found.
#         """
#         for controller in AlienFXController.supported_controllers:
#             vid = controller.vendor_id
#             pid = controller.product_id
#             dev = usb.core.find(idVendor=vid, idProduct=pid)
#             if dev is not None:
#                 return controller
#         return None
# 
#     @staticmethod
#     def find_controllers(vendor):
#         """Go through the usb-bus and find devices(and most likely controllers) by vendor-id"""
#         vid = int(vendor, 16)  # Convert our given Vendor-HEX-String to an equivalent intenger
# 
#         devs = usb.core.find(find_all=1)  # All USB devices
#         devices = []  # List of found AFX-Controllers
#         for dev in devs:
#             if dev is not None:
#                 if dev.idVendor is not None:
#                     if dev.idVendor == vid:
#                         devices.append(dev)
#         if len(devices):
#             return devices
#         return None


# Path: alienfx/ui/console/main.py
import argparse
import logging
import pkg_resources
import alienfx.common
import alienfx.core.themefile as alienfx_themefile
import alienfx.core.logger as alienfx_logger
import alienfx.core.zonescanner as alienfx_zonescanner
import sys
from alienfx.core.prober import AlienFXProber

    try:
        argparser = argparse.ArgumentParser(
            description="""AlienFX is a utility to control the lighting effects 
                of your Alienware computer. 
                Lighting effect configurations are stored in theme files."""
        )
        argparser.add_argument(
            "-l", "--log", help="write detailed logging information to LOG"
        )
        argparser.add_argument(
            "-t", "--theme",
            help="set the lighting theme to THEME."
        )
        argparser.add_argument(
            "-s", "--list", action="store_const", const=1, 
            help="list all available lighting themes"
        )
        argparser.add_argument(
            "-v", "--version", action="version", 
            version="%(prog)s {}".format(alienfx.common.get_version())
        )
        argparser.add_argument(
            "-z", "--zonescan", action="store_true", help="starts a zonescan"
        )
        args = argparser.parse_args()
        if args.zonescan is not None:
            if args.zonescan:
                doZonescan()
                return True


        if args.log is not None: