macropy

Adding Macros to Python

Adding Macros to Python Question: I would like to invoke the following code in-situ wherever I refer to MY_MACRO in my code below. # MY_MACRO frameinfo = getframeinfo(currentframe()) msg = ‘We are on file ‘ + frameinfo.filename + ‘ and line ‘ + str(frameinfo.lineno) # Assumes access to namespace and the variables in which `MY_MACRO` …

Total answers: 7