1 Star 0 Fork 2

bxfa/Http.Lib

forked from Andres6936/Http.Lib 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
split.py 1006 Bytes
一键复制 编辑 原始数据 按行查看 历史
TheMaverickProgrammer 提交于 2020-01-25 17:19 . Update split.py
import os
import sys
border = '// ----------------------------------------------------------------------------'
PythonVersion = sys.version_info[0];
with open('httplib.h') as f:
lines = f.readlines()
inImplementation = False
if PythonVersion < 3:
os.makedirs('out')
else:
os.makedirs('out', exist_ok=True)
with open('out/httplib.h', 'w') as fh:
with open('out/httplib.cc', 'w') as fc:
fc.write('#include "httplib.h"\n')
fc.write('namespace httplib {\n')
for line in lines:
isBorderLine = border in line
if isBorderLine:
inImplementation = not inImplementation
else:
if inImplementation:
fc.write(line.replace('inline ', ''))
pass
else:
fh.write(line)
pass
fc.write('} // namespace httplib\n')
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/bxfa/Http.Lib.git
git@gitee.com:bxfa/Http.Lib.git
bxfa
Http.Lib
Http.Lib
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385