1 # -*- coding: utf-8 -*-
2 #Author: Pierre Ratinaud
3 #Copyright (c) 2008-2020 Pierre Ratinaud
4 #modification pour python 3 : Laurent Mérat, 6x7 - mai 2020
7 #------------------------------------
8 # import des modules python
9 #------------------------------------
12 from time import sleep
14 #------------------------------------
15 # import des modules wx
16 #------------------------------------
19 #------------------------------------
20 # import des fichiers du projet
21 #------------------------------------
22 from chemins import ffr, FFF
23 from analysematrix import AnalyseMatrix
24 from functions import exec_rcode, check_Rresult
25 from dialog import FreqDialog
26 from PrintRScript import PrintRScript
27 from tableau import Tableau
30 class SplitMatrixFromVar(AnalyseMatrix):
32 def doparametres(self, dlg=None) :
36 dial = FreqDialog(self.parent, self.tableau.get_colnames(), "Column", size=(350, 200), showNA = False)
38 val = dial.ShowModal()
40 self.parametres['colsel'] = dial.m_listBox1.GetSelections()
41 self.parametres['header'] = dial.header
42 self.parametres['tohistory'] = False
44 self.parametres = None
48 newtabs = self.tableau.splitfromvar(self.parametres['colsel'][0])
50 tab = Tableau(self.ira, os.path.join(self.tableau.pathout['%s.csv' % mod]).replace('*',''))
51 if not os.path.exists(tab.pathout.dirout) :
52 os.mkdir(tab.pathout.dirout)
53 tab.linecontent = newtabs[mod]
54 tab.make_content_simple()
55 tab.parametres['matrix'] = tab.parametres['uuid']
56 self.ira.tree.OnItemAppend(tab.parametres, select = False)