def setButtonFontWeightString(button, isBold):
 try:
  weightString = 'normal'
  if isBold:
   weightString = 'bold'
  splitFont = button['font'].split()
  button['font'] = (splitFont[0], splitFont[1], weightString)
 except:
  pass

def setButtonFontWeightString ( button , isBold ) : try : weightString = 'normal' if isBold : weightString = 'bold' splitFont = button [ 'font' ] . split ( ) button [ 'font' ] = ( splitFont [ 0 ] , splitFont [ 1 ] , weightString ) except : pass
set button font weight given isbold .