première mise à jour pour python 3
[iramuteq] / textlabbe.py
index 3171aad..a3f94ba 100644 (file)
@@ -1,22 +1,37 @@
 # -*- coding: utf-8 -*-
 #Author: Pierre Ratinaud
-#Copyright (c) 2016-2017 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 tempfile
+from time import sleep
+import logging
+
+#------------------------------------
+# import des modules wx
+#------------------------------------
+import wx
+
+#------------------------------------
+# import des fichiers du projet
+#------------------------------------
 from chemins import ConstructPathOut, StatTxtPathOut, PathOut, ffr
 from analysetxt import AnalyseText
-import wx
-import os
 from functions import exec_rcode, progressbar, check_Rresult, CreateIraFile, print_liste, treat_var_mod, write_tab, DoConf, TGen
 from dialog import OptLexi
-import tempfile
 from PrintRScript import LabbeScript
-from time import sleep
-import logging
+
 
 log = logging.getLogger('iramuteq.labbe')
 
+
 class DistLabbe(AnalyseText) :
+
     def doanalyse(self) :
         pathout = self.pathout.dirout
         self.dictpathout = StatTxtPathOut(pathout)
@@ -66,17 +81,18 @@ class DistLabbe(AnalyseText) :
         write_tab(tabout, self.dictpathout['tableafcm'])
         #tabout = self.corpus.make_efftype_from_etoiles(self.listet)
         #write_tab(tabout, self.dictpathout['tabletypem'])
+        self.dlg = progressbar(self, 3)
         if self.dlg :
-            self.dlg.Update(2, u'R...')
+            self.dlg.Update(2, 'R...')
         script = LabbeScript(self)
         script.make_script()
         self.doR(script.scriptout, dlg = self.dlg, message = 'R...')
-
         if self.dlg :
-            self.dlg.Update(3, u'Chargement...')
-        afcf_graph_list = [[os.path.basename(self.dictpathout['afcf_row']), u'lignes'],\
-                            [os.path.basename(self.dictpathout['afcf_col']), u'colonnes']]
-        #afct_graph_list = [[os.path.basename(self.dictpathout['afct_row']), u'lignes'],\
-        #                    [os.path.basename(self.dictpathout['afct_col']), u'colonnes']]
+            self.dlg.Update(3, 'Chargement...')
+        afcf_graph_list = [[os.path.basename(self.dictpathout['afcf_row']), 'lignes'],\
+                            [os.path.basename(self.dictpathout['afcf_col']), 'colonnes']]
+        #afct_graph_list = [[os.path.basename(self.dictpathout['afct_row']), 'lignes'],\
+        #                    [os.path.basename(self.dictpathout['afct_col']), 'colonnes']]
         print_liste(self.dictpathout['liste_graph_afcf'],afcf_graph_list)
         #print_liste(self.dictpathout['liste_graph_afct'],afct_graph_list)
+        self.dlg.Destroy()