def regenerate(filename, natives):
with open(filename) as fp:
content = fp.read()
header = content[:content.find('FUNCTIONS = (')]
footer = content[content.find("if __name__ == '__main__':")-1:]
with open(filename, 'w') as fp:
fp.write(header)
fp.write(format_lines('FUNCTIONS', natives))
fp.write(footer)
_sourcemod_builtins.py 文件源码
python
阅读 21
收藏 0
点赞 0
评论 0
评论列表
文章目录