def create_program_action(parent, text, name, icon=None, nt_name=None):
 if is_text_string(icon):
  icon = get_icon(icon)
 if ((os.name == 'nt') and (nt_name is not None)):
  name = nt_name
 path = programs.find_program(name)
 if (path is not None):
  return create_action(parent, text, icon=icon, triggered=(lambda : programs.run_program(name)))

def create_program_action ( parent , text , name , icon = None , nt_name = None ) : if is_text_string ( icon ) : icon = get_icon ( icon ) if ( ( os . name == 'nt' ) and ( nt_name is not None ) ) : name = nt_name path = programs . find_program ( name ) if ( path is not None ) : return create_action ( parent , text , icon = icon , triggered = ( lambda : programs . run_program ( name ) ) )
create action to run a program .