def match_rank (self, ps):
        """ Returns true if the generator can be run with the specified
            properties.
        """
        # See if generator's requirements are satisfied by
        # 'properties'.  Treat a feature name in requirements
        # (i.e. grist-only element), as matching any value of the
        # feature.
        assert isinstance(ps, property_set.PropertySet)
        all_requirements = self.requirements ()

        property_requirements = []
        feature_requirements = []
        # This uses strings because genenator requirements allow
        # the '<feature>' syntax without value and regular validation
        # is not happy about that.
        for r in all_requirements:
            if get_value (r):
                property_requirements.append (r)

            else:
                feature_requirements.append (r)

        return all(ps.get(get_grist(s)) == [get_value(s)] for s in property_requirements) \
               and all(ps.get(get_grist(s)) for s in feature_requirements)
def match_rank ( self , ps ) : assert isinstance ( ps , property_set . PropertySet ) all_requirements = self . requirements ( ) property_requirements = [ ] feature_requirements = [ ] for r in all_requirements : if get_value ( r ) : property_requirements . append ( r ) else : feature_requirements . append ( r ) return all ( ps . get ( get_grist ( s ) ) == [ get_value ( s ) ] for s in property_requirements ) and all ( ps . get ( get_grist ( s ) ) for s in feature_requirements )
Returns true if the generator can be run with the specified
            properties.