def print_args():
    if len(sys.argv) < 4:
        print '\n' + os.path.basename(sys.argv[0]) + \
                    ' <PortalURL>' \
                    ' <AdminUser>' \
                    ' <AdminUserPassword>' \
                    ' {GUID{,GUID...}}'
        print '\nWhere:'
        print '\n\t<PortalURL> (required): URL of Portal ' \
                    '(i.e. https://fully_qualified_domain_name/arcgis)'
        print '\n\t<AdminUser> (required): Primary portal administrator user.'
        print '\n\t<AdminUserPassword> (required): Password for AdminUser.'
        print '\n\t{GUID{,GUID...}} (optional): GUIDs of source items to ' \
                    'publish'
        print '\tNOTE: Valid source item types: {}'.format(
                                    ', '.join(SOURCE_ITEM_TYPES))
        print '\tNOTE: If GUID arguement is not provided all valid source ' \
                    ' items are published.'
        return None
    else:
        # Set variables from parameter values
        portal_address = sys.argv[1]
        adminuser = sys.argv[2]
        password = sys.argv[3]
        guids = None
        if len(sys.argv) == 5:
            guids = sys.argv[4]
            guids = [guid.strip() for guid in guids.split(',')]
        return portal_address, adminuser, password, guids
Merit function to evaluate if a target is observable.
dataset/ETHPy150Open Esri/ops-server-config/Publish/Portal/PublishHostedServices.py/print_args--crossover with--dataset/ETHPy150Open panoptes/POCS/panoptes/scheduler/merits/basic.py/observable