tgcode ="dafafadfaf"
result = "window.config = "%s";" % (tgcode)
print(result)
f.write(result, )
python window.config ="dafafadfaf";
window.config ="dafafadfaf
";//
" ,"
//
def modify_text_folder(tgcode):
CONFIG_PATT = "D:\\ANDROID\\test1\HBuilder-Integrate-AS\\app\src\\main\\assets\\apps\\H56356094\\www\\"
FIlENAME = "channelConfig.js"
fpath = CONFIG_PATT + FIlENAME
result = "window.config = "%s";" % (tgcode)
-sharp with open(fpath, "r+") as f:
-sharp read_data = f.read()
-sharp f.seek(0)
-sharp f.truncate() -sharp
-sharp result = "window.config = "%s";" % (tgcode)
-sharp print(result)
-sharp f.write(result)
-sharp f.close()
print(result)
with codecs.open(fpath, "wb+", encoding="utf8")as f:
f.truncate()
f.write(result)
f.close()
result = "window.config = "%s";" % (tgcode) ;
**
excel ~
**