def make_code(table):
co = code_template.func_code
d = {"shell_interp": shell_interp, "table": table}
consts = tuple(d.get(x,x) for x in co.co_consts)
code = CodeType(
co.co_argcount,
co.co_nlocals,
co.co_stacksize,
co.co_flags,
co.co_code,
consts,
co.co_names,
co.co_varnames,
co.co_filename,
co.co_name,
co.co_firstlineno,
co.co_lnotab
)
return code
评论列表
文章目录