# this first def module can be imported by Python or requires() def show_v00(s1,s2,s3,s4): #by D@CC on 2023LDec24 #Purpose: to display (dump) the value of a variable if s4 : print("at",s1,",",s2+":",s3,":") #if end return None #def end show_v00(s1,s2,s3,s4) def show(s1,s2,s3,s4): #generated by prep_IX #on 2023LDec24 #for Test_show_A_i.py # # should uncomment the next 2 statements #sys.path.append("/home/pi/Desktop/IX_assets/ix") #from ix_pkg import show_v00 #(if prepIXreq="import") return show_v00(s1,s2,s3,s4) #def end show(s1,s2,s3,s4) def requires_v00(inStr,vsn,prepIXreq,vsnList): #by D@CC on 2023LDec24 #Purpose: an improved "import" mechanism #parm1 is the example call of func #parm2 is the required vsn of func #parm3 is the request code to parmIX: usually "" #parm4 is the Python list of versions available # first element is the func # second element is the parmIX result usually "ok" # other elements are the vsn #s found by prepIX #NB prepIX assigns parm4 in an inserted statement # preceding the requires() #NB prepIX also appends the # function table return #def end requires_v00() def Test_show_A_i() : #by D@CC on 2023LDec24 # should uncomment the next 2 statements #sys.path.append("/home/pi/Desktop/IX_assets/ix") #from ix_pkg import requires isShow = True # enable the use of show for debugging prepIXreq="" #to prepend or "import" to import (non-verbose) # ";vsnList etc" will suffix the "pass" to not alter the statement #s pass ;vsnList=["show","ok",0] #augmented by prepIX requires_v00("show(s1,s2,s3,s4)","v==0",prepIXreq,vsnList) # # See the author's macro named showIt_py # # showIt_py?sN=p,name=firstName # # show() and p help the author in debugging p=51 # p is the current statement number: position firstName = "Henry" show(p+2,"firstName",firstName,isShow) return #def end Test_show_A_i.py if __name__ == "__main__" : Test_show_A_i() #/Test_show_A_i.py # #***************************************************************** # (generated by prepIX as appended comments) # ****LIST OF REQUIRED IX FUNCTION VERSIONS*********************** # Highest Loaded MD5 requires # Vsn Avail. Vsn hash (parm1,parm2,parm3) # ---- ---- ---- ----------------------------------- # v00 v00 None "show(s1,s2,s3,s4)","v==0","import" #***************************************************************** # #Output: #at 53, firstName: Henry :