X-Git-Url: http://www.iramuteq.org/git?a=blobdiff_plain;f=tabsplitvar.py;h=9cdad8558f73c0443750e5fe395e4c0caab5e298;hb=eaa044d1147e26b82942ce56d5965c83fdddf069;hp=73eca1ec442c5e28d05b42e11f6fa0c4829f8db3;hpb=10d67a5cd48583c060b6a0e77e87c41f80671027;p=iramuteq diff --git a/tabsplitvar.py b/tabsplitvar.py index 73eca1e..9cdad85 100644 --- a/tabsplitvar.py +++ b/tabsplitvar.py @@ -1,26 +1,39 @@ -#!/bin/env python # -*- coding: utf-8 -*- #Author: Pierre Ratinaud -#Copyright (c) 2014 Pierre Ratinaud +#Copyright (c) 2008-2020 Pierre Ratinaud +#modification pour python 3 : Laurent Mérat, 6x7 - mai 2020 #License: GNU/GPL +#------------------------------------ +# import des modules python +#------------------------------------ import os -import wx -from chemins import ffr, FFF import tempfile from time import sleep + +#------------------------------------ +# import des modules wx +#------------------------------------ +import wx + +#------------------------------------ +# import des fichiers du projet +#------------------------------------ +from chemins import ffr, FFF from analysematrix import AnalyseMatrix from functions import exec_rcode, check_Rresult from dialog import FreqDialog from PrintRScript import PrintRScript from tableau import Tableau + class SplitMatrixFromVar(AnalyseMatrix): + def doparametres(self, dlg=None) : if dlg is None : return else : - dial = FreqDialog(self.parent, self.tableau.get_colnames(), u"Column", size=(350, 200), showNA = False) + dial = FreqDialog(self.parent, self.tableau.get_colnames(), "Column", size=(350, 200), showNA = False) dial.CenterOnParent() val = dial.ShowModal() if val == wx.ID_OK : @@ -30,14 +43,14 @@ class SplitMatrixFromVar(AnalyseMatrix): else : self.parametres = None dial.Destroy() - + def doanalyse(self): newtabs = self.tableau.splitfromvar(self.parametres['colsel'][0]) for mod in newtabs : - tab = Tableau(self.ira, os.path.join(self.tableau.pathout['%s.csv' % mod]).replace(u'*','')) + tab = Tableau(self.ira, os.path.join(self.tableau.pathout['%s.csv' % mod]).replace('*','')) if not os.path.exists(tab.pathout.dirout) : os.mkdir(tab.pathout.dirout) tab.linecontent = newtabs[mod] tab.make_content_simple() tab.parametres['matrix'] = tab.parametres['uuid'] - self.ira.tree.OnItemAppend(tab.parametres, select = False) \ No newline at end of file + self.ira.tree.OnItemAppend(tab.parametres, select = False)