def sort_resources(resources):
 for resource in resources:
  resource.library.init_library_nr()
 def key(resource):
  return (resource.order, resource.library.library_nr, resource.library.name, resource.custom_order, resource.dependency_nr, resource.relpath)
 return sorted(resources, key=key)

def sort_resources ( resources ) : for resource in resources : resource . library . init_library_nr ( ) def key ( resource ) : return ( resource . order , resource . library . library_nr , resource . library . name , resource . custom_order , resource . dependency_nr , resource . relpath ) return sorted ( resources , key = key )
sort resources for inclusion on web page .