This module can also be run directly for testing
        Args:
            detail|list : Provide ``detail`` or version ``list``.
            system|system+user: System installed and System and User installs.

def __main():
    '''This module can also be run directly for testing
        Args:
            detail|list : Provide ``detail`` or version ``list``.
            system|system+user: System installed and System and User installs.
    '''
    if len(sys.argv) < 3:
        sys.stderr.write('usage: {0} <detail|list> <system|system+user>\n'.format(sys.argv[0]))
        sys.exit(64)
    user_pkgs = False
    version_only = False
    if six.text_type(sys.argv[1]) == 'list':
        version_only = True
    if six.text_type(sys.argv[2]) == 'system+user':
        user_pkgs = True
    import salt.utils.json
    import timeit

    def run():
        '''
        Main run code, when this module is run directly
        '''
        pkg_list = WinSoftware(user_pkgs=user_pkgs, version_only=version_only)
        print(salt.utils.json.dumps(pkg_list.data, sort_keys=True, indent=4))  # pylint: disable=superfluous-parens
        print('Total: {}'.format(len(pkg_list)))  # pylint: disable=superfluous-parens

    print('Time Taken: {}'.format(timeit.timeit(run, number=1)))