X-Git-Url: http://iramuteq.org/git?a=blobdiff_plain;f=tabchi2.py;h=aa5ea7c34edf09995da0676214c9042ac7a33722;hb=11a360f9b1d2dc97a406378cd4b49ec3b71de2a0;hp=11922b3ffa37bb78f7a1589b1a886509147a7a39;hpb=eaa044d1147e26b82942ce56d5965c83fdddf069;p=iramuteq diff --git a/tabchi2.py b/tabchi2.py index 11922b3..aa5ea7c 100755 --- a/tabchi2.py +++ b/tabchi2.py @@ -143,13 +143,13 @@ class ChiSquare(AnalyseMatrix): cont<-1 """%(ffr(self.tableau.parametres['csvfile']), self.tableau.parametres['syscoding']) if len(self.colsel1)==1: - strsel1=str(self.colsel1).replace(',','') + strsel1=str(tuple(self.colsel1)).replace(',','') else: - strsel1=str(self.colsel1) + strsel1=str(tuple(self.colsel1)) if len(self.colsel2)==1: - strsel2=str(self.colsel2).replace(',','') + strsel2=str(tuple(self.colsel2)).replace(',','') else: - strsel2=str(self.colsel2) + strsel2=str(tuple(self.colsel2)) txt+=""" for (i in c%s) {""" % strsel1 txt+=""" @@ -308,7 +308,7 @@ class ChiSquare(AnalyseMatrix): """ % (ffr(self.parametres['pathout']),ffr(self.OutFrame)) tmpfile=tempfile.mktemp(dir=self.TEMPDIR) print(tmpfile) - tmpscript=open(tmpfile,'w') + tmpscript=open(tmpfile,'w', encoding='utf8') tmpscript.write(txt) tmpscript.close() pid = exec_rcode(self.RPath, tmpfile, wait = False) @@ -334,7 +334,7 @@ class ChiSquare(AnalyseMatrix): def dolayout(self, option): ListFile=[False] - file=open(self.OutFrame,'r') + file=open(self.OutFrame,'r', encoding='utf8') content=file.readlines() file.close() lcont = [line.replace('"','').replace('\n','').split(';') for line in content] @@ -381,7 +381,7 @@ class ChiSquare(AnalyseMatrix): allhtml.append(html_graphs) header=""" \n - \n + \n
\n