Commit d8374ad4 authored by Andreas Freise's avatar Andreas Freise
Browse files

fixing problem with temporary file in python3

parent 85254c16
......@@ -959,7 +959,7 @@ class kat(object):
r.yaxis = self.yaxis
r.katScript = "".join(self.generateKatScript())
r.katScript = "".join(self.generateKatScript())
if (plot==None):
# ensure we don't do any plotting. That should be handled
......@@ -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)
filepath =os.path.join(self.__tempdir, self.__tempname+".kat" )
katfile = open( filepath, 'w' )
#katfile.writelines(bytes(r.katScript, 'UTF-8'))
if printout == 1 or plot != None:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment