#NEWLINE# def LoadDictionaryFromTable( pTable , pKeyField , pValueField , pOrderField ) : #NEWLINE# #INDENT# if ( pOrderField == None ) : #NEWLINE# #INDENT# return dict ( [ ( r . getValue ( pKeyField ) , r . getValue ( pValueField ) ) for r in arcpy . SearchCursor ( pTable ) ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return collections . OrderedDict ( [ ( r . getValue ( pKeyField ) , r . getValue ( pValueField ) ) for r in arcpy . SearchCursor ( pTable , '' , None , '' , pOrderField ) ] )