Update split.py

now works with legacy Python ( < 3.0)
This commit is contained in:
TheMaverickProgrammer 2020-01-25 17:17:34 -06:00 committed by GitHub
parent f94c3f1dc9
commit e932c7e1ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -2,10 +2,17 @@ import os
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')