py_ext/PythonFileCTNMixin.py
changeset 3806 b57a38ce3f34
parent 3752 9f6f46dbe3ae
equal deleted inserted replaced
3805:5a66d4be2e49 3806:b57a38ce3f34
   241 """ % loc_dict
   241 """ % loc_dict
   242 
   242 
   243         # write generated content to python file
   243         # write generated content to python file
   244         runtimefile_path = os.path.join(buildpath,
   244         runtimefile_path = os.path.join(buildpath,
   245                                         "runtime_%s.py" % location_str)
   245                                         "runtime_%s.py" % location_str)
   246         runtimefile = open(runtimefile_path, 'w')
   246         runtimefile = open(runtimefile_path, 'wb')
   247         runtimefile.write(PyFileContent.encode('utf-8'))
   247         runtimefile.write(PyFileContent.encode('utf-8'))
   248         runtimefile.close()
   248         runtimefile.close()
   249 
   249 
   250         # C code for safe global variables access
   250         # C code for safe global variables access
   251 
   251