From c53744151df01b2a1d9181a30e12180d47e94012 Mon Sep 17 00:00:00 2001 From: Pierre Ratinaud Date: Sun, 14 Sep 2014 14:28:42 +0200 Subject: [PATCH] dlg --- analysetxt.py | 11 +++++++---- iramuteq.py | 14 +++++++------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/analysetxt.py b/analysetxt.py index 95fcfa2..e744b64 100644 --- a/analysetxt.py +++ b/analysetxt.py @@ -5,7 +5,7 @@ import logging from chemins import PathOut -from functions import exec_rcode, check_Rresult, DoConf, ReadDicoAsDico +from functions import exec_rcode, check_Rresult, DoConf, ReadDicoAsDico, progressbar from shutil import copy from time import time, sleep from uuid import uuid4 @@ -31,6 +31,7 @@ class AnalyseText : else : self.pathout = PathOut(filename=corpus.parametres['originalpath'], dirout=self.parametres['pathout'], analyse_type=self.parametres['type']) self.parametres = self.lemparam() + if self.parametres is not None : self.parametres = self.make_config(parametres) log.info(self.pathout.dirout) @@ -57,6 +58,8 @@ class AnalyseText : copy(self.parametres['dictionary'], dictpath) self.parametres['dictionary'] = dictpath self.corpus.parse_active(gramact, gramsup) + if dlg : + self.dlg = progressbar(self.ira, dlg) result_analyse = self.doanalyse() if result_analyse is None : self.time = time() - self.t1 @@ -67,17 +70,17 @@ class AnalyseText : DoConf().makeoptions([self.parametres['type']], [self.parametres], self.pathout['Analyse.ira']) self.ira.history.add(self.parametres) if dlg : - dlg.Destroy() + self.dlg.Destroy() OpenAnalyse(self.parent, self.parametres['ira']) self.ira.tree.AddAnalyse(self.parametres) self.val = 5100 else : self.val = False if dlg : - dlg.Destroy() + self.dlg.Destroy() else : if dlg : - dlg.Destroy() + self.dlg.Destroy() self.val = False def doanalyse(self) : diff --git a/iramuteq.py b/iramuteq.py index a826eba..f64e1b5 100644 --- a/iramuteq.py +++ b/iramuteq.py @@ -901,7 +901,7 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, États-Unis.""" #self.Text = SimiTxt(self) if corpus is None : corpus = self.tree.getcorpus() - self.Text = SimiTxt(self, corpus, parametres = {'type': 'simitxt'}, dlg = progressbar(self, 3)) + self.Text = SimiTxt(self, corpus, parametres = {'type': 'simitxt'}, dlg = 3) if self.Text.val == wx.ID_OK : PlaySound(self) except : @@ -912,14 +912,14 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, États-Unis.""" try : if corpus is None : corpus = self.tree.getcorpus() - self.Text = WordCloud(self, corpus, parametres = {'type' : 'wordcloud'}, dlg = progressbar(self, 3)) + self.Text = WordCloud(self, corpus, parametres = {'type' : 'wordcloud'}, dlg = 3) if self.Text.val == wx.ID_OK : PlaySound(self) except : BugReport(self) def OnClusterCloud(self, corpus, parametres = None) : - self.Text = ClusterCloud(self, corpus, parametres = parametres, dlg = progressbar(self, 3)) + self.Text = ClusterCloud(self, corpus, parametres = parametres, dlg = 3) def OnAFCM(self, event): try: @@ -932,7 +932,7 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, États-Unis.""" try: if corpus is None : corpus = self.tree.getcorpus() - self.Text = Stat(self, corpus, parametres = {'type': 'stat'}, dlg = progressbar(self, 7)) + self.Text = Stat(self, corpus, parametres = {'type': 'stat'}, dlg = 7) if self.Text.val == wx.ID_OK : PlaySound(self) @@ -945,7 +945,7 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, États-Unis.""" #print('ATTENTION : PLUS DE BUG SUR LEXICO') if corpus is None : corpus = self.tree.getcorpus() - self.Text = Lexico(self, corpus, parametres = {'type' : 'spec'}, dlg = progressbar(self, 3)) + self.Text = Lexico(self, corpus, parametres = {'type' : 'spec'}, dlg = 3) if self.Text.val == wx.ID_OK : PlaySound(self) except: @@ -997,7 +997,7 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, États-Unis.""" #RunAnalyse(self, corpus, Alceste, OptAlceste) if corpus is None : corpus = self.tree.getcorpus() - self.Text = Reinert(self, corpus, parametres = {'type': 'alceste'}, dlg = progressbar(self,6)) + self.Text = Reinert(self, corpus, parametres = {'type': 'alceste'}, dlg = 6) if self.Text.val == wx.ID_OK: PlaySound(self) except: @@ -1007,7 +1007,7 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, États-Unis.""" try: if corpus is None : corpus = self.tree.getcorpus() - self.Text = AnalysePam(self, corpus, parametres = {'type' : 'pamtxt'}, dlg = progressbar(self,6)) + self.Text = AnalysePam(self, corpus, parametres = {'type' : 'pamtxt'}, dlg = 6) if self.Text.val == wx.ID_OK: PlaySound(self) except: -- 2.7.4