def print_ospf_out(a_dict):
 field_order = ('Int', 'IP', 'Area', 'Type', 'Cost', 'Hello', 'Dead')
 print
 for a_field in field_order:
  if (a_dict.get(a_field) is not None):
   print ('%15s:   %-20s' % (a_field, a_dict.get(a_field)))

def print_ospf_out ( a_dict ) : field_order = ( 'Int' , 'IP' , 'Area' , 'Type' , 'Cost' , 'Hello' , 'Dead' ) print for a_field in field_order : if ( a_dict . get ( a_field ) is not None ) : print ( '%15s:   %-20s' % ( a_field , a_dict . get ( a_field ) ) )
prints a given ospf interface section to stdout .