def dprint(state, msg): if state.debug == True: print(msg)