Ejemplo n.º 1
0
 def sort2(component):
     if component.getPrefix().lower() in SortPrefix:
         # Sort by Prefix then by Value
         result = [component.getPrefix(), componentValue(component.getValue())]
         print('sort="{}"'.format(result))
         return result
     else:
         # Sort by Reference Designator only
         result = natural_sort(component.getRef())
         print('sort={}'.format(result))
         return result
Ejemplo n.º 2
0
 def sortComponents(self):
     self.components = sorted(self.components,
                              key=lambda c: natural_sort(c.getRef()))
Ejemplo n.º 3
0
 def sort1(component):
     return natural_sort(component.getRef())
Ejemplo n.º 4
0
 def sortComponents(self):
     self.components = sorted(self.components, key=lambda c: natural_sort(c.getRef()))