Skip to content
Snippets Groups Projects
Commit d8374ad4 authored by Andreas Freise's avatar Andreas Freise
Browse files

fixing problem with temporary file in python3

parent 85254c16
Branches
No related tags found
No related merge requests found
......@@ -971,12 +971,13 @@ class kat(object):
# create a kat file which we will write the script into
if self.__tempname == None:
katfile = tempfile.NamedTemporaryFile(suffix=".kat", dir=self.__tempdir)
katfile = tempfile.NamedTemporaryFile(mode ='w', suffix=".kat", dir=self.__tempdir)
else:
filepath =os.path.join(self.__tempdir, self.__tempname+".kat" )
katfile = open( filepath, 'w' )
katfile.writelines(r.katScript)
#katfile.writelines(bytes(r.katScript, 'UTF-8'))
katfile.flush()
if printout == 1 or plot != None:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment