Update preprocess.py

This commit is contained in:
BLUELOVETH 2023-05-29 15:39:47 +08:00
parent a415781304
commit a186f52354

View File

@ -25,7 +25,10 @@ namespace pkpy{
inline static std::map<std::string, const char*> kPythonLibs = {
'''
for key, value in sources.items():
header += ' '*8 + '{"' + key + '", "' + value + '"},'
CHAR_LIMIT = 5000
value = ['"' + value[i:i+CHAR_LIMIT] + '" ' for i in range(0, len(value), CHAR_LIMIT)]
value = ''.join(value)
header += ' '*8 + '{"' + key + '", ' + value + '},'
header += '\n'
header += '''