import ast def newTempPyInt(): variableName = "pTemp" + str(ast.blocks[-1].nextTempInteger()) ast.output("\t.local pmc " + variableName) ast.output("\t%s = new PyInt" % variableName) return variableName