******************************************** showMP(isShow,objName,obj,sN) (text) ******************************************** #by D@CC #on 2023DApr05 #mod 2024BFeb28 #Project: WioClock #Code: MicroPython SPECIAL VSN OF SHOW #Purpose: SPECIAL show var name and value # NOTE: replaces show() for MicroPython # NOTE: Parms are different from show() #Parm0: var name #Parm1: var value #Parm2: isShow=True shows the info # =False shows nothing #Parm3: sN statement number #Returns: nothing #calls: isInstance() NOT isinstance # type() if not isShow: return if not isInstance(objName,str): print("Error S01 in show Name is not a str:",objname) #if end if isInstance(obj, str) or isInstance(obj,list) or isInstance(obj,int)or isInstance(obj,bool): #is ok print(sN,objName,":",obj,":") else: typeObj=type(obj) print("Error S02 in show obj is not a str, list, int nor bool:",objName,"type:",typeObj,"value:",obj) return #if end ****************************************************************************************************** #/showMP.txt