From: pierre Date: Fri, 2 Aug 2024 15:13:23 +0000 (+0200) Subject: 0.8a3 X-Git-Url: http://iramuteq.org/git?a=commitdiff_plain;h=daf99213b4bb134b92792ea367effaf8aa9cf571;p=iramuteq 0.8a3 --- diff --git a/OptionAlceste.py b/OptionAlceste.py index 991fb20..f0af6f2 100755 --- a/OptionAlceste.py +++ b/OptionAlceste.py @@ -50,7 +50,7 @@ class OptionAlc(wx.Dialog): self.spin_nbcl = wx.SpinCtrl(self, -1, "",size = (100,30), min=2, max=1000000) txt = _("Minimum frequency of text segments by clusters (0=automatic)") self.label_7 = wx.StaticText(self, -1, txt) - self.spin_ctrl_4 = wx.SpinCtrl(self, -1, "",size = (100,30), min=0, max=1000000) + self.spin_ctrl_4 = wx.SpinCtrl(self, -1, "",size = (100,30), min=0, max=1000000) txt = _("Minimum frequency of an analyzed form (2=automatic)") self.label_8 = wx.StaticText(self, -1, txt) self.spin_ctrl_5 = wx.SpinCtrl(self, -1, "",size = (100,30), min=2, max=1000000) diff --git a/ProfList.py b/ProfList.py index 5e35765..e4629b1 100644 --- a/ProfList.py +++ b/ProfList.py @@ -95,17 +95,17 @@ class ProfListctrlPanel(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin, listmix.Col exec(s) self.SetImageList(self.il, wx.IMAGE_LIST_SMALL) #adding some attributes (colourful background for each item rows) - self.attr1 = wx.ListItemAttr() + self.attr1 = wx.ItemAttr() self.attr1.SetBackgroundColour((220, 220, 220)) - self.attrsg = wx.ListItemAttr() + self.attrsg = wx.ItemAttr() self.attrsg.SetBackgroundColour((230, 230, 230)) - self.attr2 = wx.ListItemAttr() + self.attr2 = wx.ItemAttr() self.attr2.SetBackgroundColour((190, 249, 236)) - self.attr2s = wx.ListItemAttr() + self.attr2s = wx.ItemAttr() self.attr2s.SetBackgroundColour((211, 252, 244)) - self.attr3 = wx.ListItemAttr() + self.attr3 = wx.ItemAttr() self.attr3.SetBackgroundColour((245, 180, 180)) - self.attr3s = wx.ListItemAttr() + self.attr3s = wx.ItemAttr() self.attr3s.SetBackgroundColour((245, 190, 190)) self.InsertColumn(0, "num", wx.LIST_FORMAT_RIGHT) self.InsertColumn(1, "eff. s.t.", wx.LIST_FORMAT_RIGHT) diff --git a/chemins.py b/chemins.py index 91efc9a..6d36c76 100644 --- a/chemins.py +++ b/chemins.py @@ -155,6 +155,7 @@ def ConstructConfigPath(AppliPath, user=True): ConfigPath = AppliPath DictConfigPath = { 'reinert': os.path.join(ConfigPath, 'reinert.cfg'), + #'key': os.path.join(ConfigPath, 'spacykeyfr.cfg'), 'key': os.path.join(ConfigPath, 'key.cfg'), 'path': os.path.join(ConfigPath, 'path.cfg'), 'preferences' : os.path.join(ConfigPath, 'iramuteq.cfg'), diff --git a/configuration/global.cfg b/configuration/global.cfg index c27d8f5..6242425 100644 --- a/configuration/global.cfg +++ b/configuration/global.cfg @@ -5,8 +5,8 @@ name = iramuteq copyright = (c) 2008-2024 Pierre Ratinaud author = Pierre Ratinaud gpl-fr = gpl-2.0-fr.txt -dev = Pierre Ratinaud (Université de Toulouse - Laboratoire LERASS - ratinaud@univ-tlse2.fr);Sébastien Déjean (Université de Toulouse);David Skalinder (Mash Strategy - davids@mash.uk.com); +dev = Pierre Ratinaud (Université de Toulouse - Laboratoire LERASS - ratinaud@univ-tlse2.fr);Sébastien Déjean (Université de Toulouse);David Skalinder (Mash Strategy - davids@mash.uk.com);Laurent Mérat; translators = Italian : Emanuele Fino;Portuguese : Brigido Vizeu Camargo;Spanish : Mariola Moreno;English : Pierre Ratinaud;French : Pierre Ratinaud -version = 0.8 alpha 2 +version = 0.8 alpha 3 licence = GNU GPL (v2) -version_nb = 0.8.a2 +version_nb = 0.8.a3 diff --git a/configuration/iramuteq.cfg b/configuration/iramuteq.cfg index 2b962fc..e2063a6 100644 --- a/configuration/iramuteq.cfg +++ b/configuration/iramuteq.cfg @@ -5,9 +5,9 @@ language=french guilanguage=french R_mem = false R_max_mem = 1535 -version_nb = 0.8.a2 +version_nb = 0.8.a3 rlibs = false libsvdc = false libsvdc_path = /usr/bin/svd rmirror = http://cran.rstudio.com/ -fontsize = 16 +fontsize = 14 diff --git a/corpus.py b/corpus.py index 555a034..2568edb 100644 --- a/corpus.py +++ b/corpus.py @@ -406,6 +406,7 @@ class Corpus : else : grams = {gram :''} tokeep = [lem for lem in self.lems if self.lems[lem].freq >= mineff and self.lems[lem].act in grams] + print(tokeep) etuces = [[] for et in etoiles] for uci in self.ucis : get = list(set(uci.etoiles).intersection(etoiles)) @@ -1677,6 +1678,7 @@ class Builder : parametres = DoConf(os.path.join(self.parent.UserConfigPath,'corpus.cfg')).getoptions('corpus') parametres['pathout'] = PathOut(parent.filename, 'corpus').mkdirout() parametres['corpus_name'] = os.path.split(parametres['pathout'])[1] + parametres['lang'] = self.parent.pref.get('iramuteq','language') dial = CorpusPref(parent, parametres) dial.CenterOnParent() dial.txtpath.SetLabel(parent.filename) diff --git a/dialog.py b/dialog.py index edefe21..87c4076 100755 --- a/dialog.py +++ b/dialog.py @@ -127,6 +127,8 @@ encodages = [['cp1252','Western Europe'], ['utf_7', 'all languages'], ['utf_8_sig', 'all languages']] +langues_n = ['français', 'english', 'german (expérimentale)', 'italian', 'swedish (expérimentale)', 'portuguese', 'spanish', 'greek (expériementale)', 'galician (expérimentale)', 'autre...'] +langues = ['french', 'english', 'german', 'italian', 'swedish', 'portuguese', 'spanish', 'greek', 'galician', 'other'] class FileOptionDialog(wx.Dialog): @@ -430,6 +432,18 @@ releases at startup""") self.langues = wx.Choice( self, wx.ID_ANY, (200, -1), choices = self.listlangues) #self.langues.SetSelection( 0 ) fgSizer1.Add( self.langues, 0, wx.ALIGN_RIGHT|wx.ALL, 5 ) + + msg = _("Default language for text") + self.m_staticText55 = wx.StaticText( self, wx.ID_ANY, msg, wx.DefaultPosition, wx.DefaultSize, 0 ) + self.m_staticText55.Wrap( -1 ) + fgSizer1.Add( self.m_staticText55, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) + self.m_staticText56 = wx.StaticText( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) + self.m_staticText56.Wrap( -1 ) + fgSizer1.Add( self.m_staticText56, 0, wx.ALL, 5 ) + self.txtlangues = wx.Choice( self, wx.ID_ANY, (200, -1), choices = langues_n) + #self.langues.SetSelection( 0 ) + fgSizer1.Add( self.txtlangues, 0, wx.ALIGN_RIGHT|wx.ALL, 5 ) + msg = _("""Check installation of R packages""") self.m_staticText5 = wx.StaticText( self, wx.ID_ANY, msg, wx.DefaultPosition, wx.DefaultSize, 0 ) @@ -441,46 +455,47 @@ of R packages""") self.m_button1 = wx.Button( self, wx.ID_ANY, _("Check"), wx.DefaultPosition, wx.DefaultSize, 0 ) fgSizer1.Add( self.m_button1, 0, wx.ALIGN_RIGHT|wx.ALL, 5 ) bSizer1.Add( fgSizer1, 1, wx.EXPAND, 5 ) - if sys.platform == 'win32' : - bSizer2 = wx.BoxSizer( wx.HORIZONTAL ) - msg = _("""Maximum -memory for R""") - self.m_staticText7 = wx.StaticText( self, wx.ID_ANY, msg, wx.DefaultPosition, wx.DefaultSize, 0 ) - self.m_staticText7.Wrap( -1 ) - bSizer2.Add( self.m_staticText7, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) - self.m_checkBox1 = wx.CheckBox( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) - bSizer2.Add( self.m_checkBox1, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) - self.m_spinCtrl1 = wx.SpinCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 32, 16000, 1535 ) - bSizer2.Add( self.m_spinCtrl1, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) - self.m_staticline7 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) - bSizer2.Add( self.m_staticline7, 0, wx.EXPAND |wx.ALL, 5 ) - bSizer1.Add( bSizer2, 0, wx.EXPAND, 5 ) - self.m_checkBox1.Bind( wx.EVT_CHECKBOX, self.oncheckmem ) + #if sys.platform == 'win32' : + # bSizer2 = wx.BoxSizer( wx.HORIZONTAL ) + # msg = _("""Maximum +#memory for R""") + # self.m_staticText7 = wx.StaticText( self, wx.ID_ANY, msg, wx.DefaultPosition, wx.DefaultSize, 0 ) + # self.m_staticText7.Wrap( -1 ) + # bSizer2.Add( self.m_staticText7, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) + # self.m_checkBox1 = wx.CheckBox( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) + # bSizer2.Add( self.m_checkBox1, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) + # self.m_spinCtrl1 = wx.SpinCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 32, 16000, 1535 ) + # bSizer2.Add( self.m_spinCtrl1, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) + # self.m_staticline7 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL ) + # bSizer2.Add( self.m_staticline7, 0, wx.EXPAND |wx.ALL, 5 ) + # bSizer1.Add( bSizer2, 0, wx.EXPAND, 5 ) + # self.m_checkBox1.Bind( wx.EVT_CHECKBOX, self.oncheckmem ) bSizer3 = wx.BoxSizer( wx.HORIZONTAL ) bSizer4 = wx.BoxSizer( wx.HORIZONTAL ) - self.text8 = wx.StaticText( self, wx.ID_ANY, _("Use svdlibc"), wx.DefaultPosition, wx.DefaultSize, 0 ) - self.text8.Wrap( -1 ) - fgSizer1.Add( self.text8, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) - self.check_svdc = wx.CheckBox( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) - bSizer4.Add( self.check_svdc, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) - bSizer3.Add( bSizer4, 0, wx.EXPAND, 5 ) - self.fbb = filebrowse.FileBrowseButton(self, -1, size=(250, -1), fileMode = 2, fileMask = '*') - bSizer3.Add( self.fbb, 0, wx.EXPAND, 5 ) - self.fbb.SetLabel(_("Path : ")) - fgSizer1.Add( wx.StaticText(self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ), wx.ID_ANY, wx.ALL, 5) - fgSizer1.Add( bSizer3, 0, wx.ALIGN_RIGHT|wx.ALL, 5 ) + #self.text8 = wx.StaticText( self, wx.ID_ANY, _("Use svdlibc"), wx.DefaultPosition, wx.DefaultSize, 0 ) + #self.text8.Wrap( -1 ) + #fgSizer1.Add( self.text8, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) + #self.check_svdc = wx.CheckBox( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) + #bSizer4.Add( self.check_svdc, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) + #bSizer3.Add( bSizer4, 0, wx.EXPAND, 5 ) + #self.fbb = filebrowse.FileBrowseButton(self, -1, size=(250, -1), fileMode = 2, fileMask = '*') + #bSizer3.Add( self.fbb, 0, wx.EXPAND, 5 ) + #self.fbb.SetLabel(_("Path : ")) + #fgSizer1.Add( wx.StaticText(self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ), wx.ID_ANY, wx.ALL, 5) + #fgSizer1.Add( bSizer3, 0, wx.ALIGN_RIGHT|wx.ALL, 5 ) Rpath_text = wx.StaticText( self, wx.ID_ANY, _("R path"), wx.DefaultPosition, wx.DefaultSize, 0 ) Rpath_text.Wrap( -1 ) fgSizer1.Add( Rpath_text, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) fgSizer1.Add( wx.StaticText(self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ), wx.ID_ANY, wx.ALL, 5) - self.Rpath_value = filebrowse.FileBrowseButton(self, -1, size=(350, -1), fileMode = 2, fileMask = '*') + self.Rpath_value = filebrowse.FileBrowseButton(self, -1, size=(350, 50), fileMode = 2, fileMask = '*') + self.Rpath_value.SetSize(wx.Size(400,50)) self.Rpath_value.SetLabel(_("Path : ")) fgSizer1.Add( self.Rpath_value, 0, wx.ALIGN_RIGHT|wx.ALL, 5 ) mirror_text = wx.StaticText( self, wx.ID_ANY, _("Default R mirror"), wx.DefaultPosition, wx.DefaultSize, 0 ) mirror_text.Wrap( -1 ) fgSizer1.Add( mirror_text, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) fgSizer1.Add( wx.StaticText(self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ), wx.ID_ANY, wx.ALL, 5) - self.mirror_value = wx.TextCtrl( self, wx.ID_ANY, 'http://cran.univ-lyon1.fr', wx.DefaultPosition, wx.Size( 300,30 ), 0 ) + self.mirror_value = wx.TextCtrl( self, wx.ID_ANY, 'http://cran.univ-lyon1.fr', wx.DefaultPosition, wx.Size( 300,50 ), 0 ) fgSizer1.Add( self.mirror_value, 0, wx.ALIGN_RIGHT|wx.ALL, 5 ) m_sdbSizer1 = wx.StdDialogButtonSizer() self.m_sdbSizer1OK = wx.Button( self, wx.ID_OK ) @@ -496,7 +511,7 @@ memory for R""") # Connect Events self.m_sdbSizer1OK.Bind( wx.EVT_BUTTON, self.OnValid ) self.m_button1.Bind( wx.EVT_BUTTON, parent.OnVerif ) - self.check_svdc.Bind( wx.EVT_CHECKBOX, self.OnSVDC ) + #self.check_svdc.Bind( wx.EVT_CHECKBOX, self.OnSVDC ) self.__set_properties() def __set_properties(self): @@ -508,21 +523,22 @@ memory for R""") else : val2 = 1 self.m_radioBox2.SetSelection(val2) self.langues.SetSelection(self.listlangues.index(self.parent.pref.get('iramuteq', 'guilanguage'))) - if sys.platform == 'win32' : - if self.parent.pref.getboolean('iramuteq', 'R_mem') : - self.m_checkBox1.SetValue(True) - self.m_spinCtrl1.Enable(True) - self.m_spinCtrl1.SetValue(self.parent.pref.getint('iramuteq', 'R_max_mem')) - else : - self.m_checkBox1.SetValue(False) - self.m_spinCtrl1.Enable(False) - if self.parent.pref.getboolean('iramuteq', 'libsvdc') : - self.check_svdc.SetValue(True) - self.fbb.SetValue(self.parent.pref.get('iramuteq', 'libsvdc_path')) - else : - self.check_svdc.SetValue(False) - self.fbb.SetValue(self.parent.pref.get('iramuteq', 'libsvdc_path')) - self.fbb.Enable(False) + self.txtlangues.SetSelection(langues.index(self.parent.pref.get('iramuteq','language'))) + #if sys.platform == 'win32' : + # if self.parent.pref.getboolean('iramuteq', 'R_mem') : + # self.m_checkBox1.SetValue(True) + # self.m_spinCtrl1.Enable(True) + # self.m_spinCtrl1.SetValue(self.parent.pref.getint('iramuteq', 'R_max_mem')) + # else : + # self.m_checkBox1.SetValue(False) + # self.m_spinCtrl1.Enable(False) + # if self.parent.pref.getboolean('iramuteq', 'libsvdc') : + # self.check_svdc.SetValue(True) + # self.fbb.SetValue(self.parent.pref.get('iramuteq', 'libsvdc_path')) + # else : + # self.check_svdc.SetValue(False) + # self.fbb.SetValue(self.parent.pref.get('iramuteq', 'libsvdc_path')) + # self.fbb.Enable(False) self.Rpath_value.SetValue(self.parent.PathPath.get('PATHS', 'rpath')) self.mirror_value.SetValue(self.parent.pref.get('iramuteq', 'rmirror')) @@ -532,11 +548,11 @@ memory for R""") else : self.m_spinCtrl1.Enable(False) - def OnSVDC(self, evt): - if self.check_svdc.GetValue() : - self.fbb.Enable(True) - else : - self.fbb.Enable(False) + # def OnSVDC(self, evt): + # if self.check_svdc.GetValue() : + # self.fbb.Enable(True) + # else : + # self.fbb.Enable(False) def OnValid(self, event): parent = self.parent @@ -547,17 +563,18 @@ memory for R""") else : valcheck = 'false' parent.pref.set('iramuteq', 'checkupdate', valcheck) parent.pref.set('iramuteq', 'guilanguage', self.listlangues[self.langues.GetSelection()]) - if sys.platform == 'win32' : - if self.m_checkBox1.GetValue() : - parent.pref.set('iramuteq', 'R_mem', 'true') - parent.pref.set('iramuteq', 'R_max_mem', str(self.m_spinCtrl1.GetValue())) - else : - parent.pref.set('iramuteq', 'R_mem', 'false') - if self.check_svdc.GetValue() : - parent.pref.set('iramuteq', 'libsvdc', 'true') - else : - parent.pref.set('iramuteq', 'libsvdc', 'false') - parent.pref.set('iramuteq', 'libsvdc_path', self.fbb.GetValue()) + parent.pref.set('iramuteq', 'language', langues[self.txtlangues.GetSelection()]) + #if sys.platform == 'win32' : + # if self.m_checkBox1.GetValue() : + # parent.pref.set('iramuteq', 'R_mem', 'true') + # parent.pref.set('iramuteq', 'R_max_mem', str(self.m_spinCtrl1.GetValue())) + # else : + # parent.pref.set('iramuteq', 'R_mem', 'false') + #if self.check_svdc.GetValue() : + # parent.pref.set('iramuteq', 'libsvdc', 'true') + #else : + # parent.pref.set('iramuteq', 'libsvdc', 'false') + #parent.pref.set('iramuteq', 'libsvdc_path', self.fbb.GetValue()) self.parent.pref.set('iramuteq', 'rmirror', self.mirror_value.GetValue()) file = open(parent.ConfigPath['preferences'], 'w', encoding='utf8') parent.pref.write(file) @@ -577,9 +594,9 @@ class PrefGraph(wx.Dialog): self.paramgraph=paramgraph self.labeltype = wx.StaticText(self, -1, _("Graphic type")) if self.paramgraph['clnb'] <= 3 : - choix = ['2D', 'web 2D'] + choix = ['2D']#, 'web 2D'] else : - choix=['2D' ,'3D', 'web 2D', 'web 3D', 'Blender'] + choix=['2D' ,'3D']#, 'web 2D', 'web 3D', 'Blender'] self.choicetype = wx.Choice(self, -1, (100,50), choices=choix) self.label_format = wx.StaticText(self, -1, _("Picture format")) self.choix_format = wx.Choice(self, -1, (100,50), choices = ['png', 'svg']) @@ -2175,8 +2192,7 @@ class CorpusPref ( wx.Dialog ): def __init__( self, parent, parametres ): wx.Dialog.__init__ ( self, parent, id = wx.ID_ANY, title = _("Settings"), pos = wx.DefaultPosition, size = wx.DefaultSize, style = wx.DEFAULT_DIALOG_STYLE | wx.STAY_ON_TOP ) self.parent = parent - langues_n = ['français', 'english', 'german (expérimentale)', 'italian', 'swedish (expérimentale)', 'portuguese', 'spanish', 'greek (expériementale)', 'galician (expérimentale)', 'autre...'] - self.langues = ['french', 'english', 'german', 'italian', 'swedish', 'portuguese', 'spanish', 'greek', 'galician', 'other'] + self.langues = langues self.encodages = [enc[0].lower() for enc in encodages] ucimark = ['****', '0000'] ucemethod = [_("characters"), _("occurrences"), _("paragraphs")] @@ -2366,7 +2382,7 @@ class CorpusPref ( wx.Dialog ): except ValueError : enc = self.encodages.index('utf-8') self.encodage_choices.SetSelection(enc) - self.lang_choices.SetSelection(0) + self.lang_choices.SetSelection(self.langues.index(parametres['lang'])) self.repout_choices.SetValue(parametres['pathout']) self.corpusname.SetValue(parametres['corpus_name']) self.ucimark_choices.SetSelection(parametres['ucimark']) @@ -3237,11 +3253,11 @@ class MergeClusterFrame ( wx.Dialog ): bSizer1.Add( self.m_panel1, 4, wx.EXPAND |wx.ALL, 5 ) self.m_panel4 = wx.Panel( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL ) bSizer5 = wx.BoxSizer( wx.HORIZONTAL ) - self.m_staticText13 = wx.StaticText( self.m_panel4, wx.ID_ANY, "MyLabel", wx.DefaultPosition, wx.DefaultSize, 0 ) + self.m_staticText13 = wx.StaticText( self.m_panel4, wx.ID_ANY, "Metadata", wx.DefaultPosition, wx.DefaultSize, 0 ) self.m_staticText13.Wrap( -1 ) bSizer5.Add( self.m_staticText13, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) self.m_textCtrl5 = wx.TextCtrl( self.m_panel4, wx.ID_ANY, "cl_", wx.DefaultPosition, wx.DefaultSize, 0 ) - self.m_textCtrl5.SetMinSize( wx.Size( 400,-1 ) ) + self.m_textCtrl5.SetMinSize( wx.Size( 400, 50 ) ) bSizer5.Add( self.m_textCtrl5, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) self.m_staticText15 = wx.StaticText( self.m_panel4, wx.ID_ANY, "+cluster number", wx.DefaultPosition, wx.DefaultSize, 0 ) self.m_staticText15.Wrap( -1 ) @@ -3255,8 +3271,8 @@ class MergeClusterFrame ( wx.Dialog ): self.m_staticText12 = wx.StaticText( self.m_panel3, wx.ID_ANY, "Corpus name", wx.DefaultPosition, wx.DefaultSize, 0 ) self.m_staticText12.Wrap( -1 ) bSizer4.Add( self.m_staticText12, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) - self.m_textCtrl4 = wx.TextCtrl( self.m_panel3, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 ) - self.m_textCtrl4.SetMinSize( wx.Size( 400,-1 ) ) + self.m_textCtrl4 = wx.TextCtrl( self.m_panel3, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 5 ) + self.m_textCtrl4.SetMinSize( wx.Size( 400, 50 ) ) bSizer4.Add( self.m_textCtrl4, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) self.m_panel3.SetSizer( bSizer4 ) self.m_panel3.Layout() @@ -3387,7 +3403,7 @@ class MergeClusterFrame ( wx.Dialog ): class FullText ( wx.Frame ): def __init__( self, parent ): - wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = wx.EmptyString, pos = wx.DefaultPosition, size = wx.Size( 500,600 ), style = wx.DEFAULT_FRAME_STYLE|wx.TAB_TRAVERSAL ) + wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = _("Full Text"), pos = wx.DefaultPosition, size = wx.Size( 500,600 ), style = wx.DEFAULT_FRAME_STYLE|wx.TAB_TRAVERSAL ) self.SetSizeHints( -1, -1 ) bSizer1 = wx.BoxSizer( wx.VERTICAL ) self.m_panel1 = wx.Panel( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL ) @@ -3398,9 +3414,10 @@ class FullText ( wx.Frame ): #bSizer2.Add( self.m_richText1, 9, wx.EXPAND |wx.ALL, 5 ) m_sdbSizer1 = wx.StdDialogButtonSizer() self.m_sdbSizer1OK = wx.Button( self.m_panel1, wx.ID_OK ) + self.m_sdbSizer1OK.Bind( wx.EVT_BUTTON, self.OnOk ) m_sdbSizer1.AddButton( self.m_sdbSizer1OK ) - self.m_sdbSizer1Cancel = wx.Button( self.m_panel1, wx.ID_CANCEL ) - m_sdbSizer1.AddButton( self.m_sdbSizer1Cancel ) + #self.m_sdbSizer1Cancel = wx.Button( self.m_panel1, wx.ID_CANCEL ) + #m_sdbSizer1.AddButton( self.m_sdbSizer1Cancel ) m_sdbSizer1.Realize(); bSizer2.Add( m_sdbSizer1, 0, wx.EXPAND, 5 ) self.m_panel1.SetSizer( bSizer2 ) @@ -3414,3 +3431,6 @@ class FullText ( wx.Frame ): def __del__( self ): pass + def OnOk( self, evt ): + self.Destroy() + diff --git a/functions.py b/functions.py index add77d8..4fed542 100755 --- a/functions.py +++ b/functions.py @@ -860,7 +860,7 @@ def treat_var_mod(variables) : # var_mod[var].append(variable) return var_mod -def doconcorde(corpus, uces, mots, uci = False, fontsize=16) : +def doconcorde(corpus, uces, mots, uci = False, fontsize=4) : if not uci : ucestxt1 = [row for row in corpus.getconcorde(uces)] else : diff --git a/guifunct.py b/guifunct.py index 2612792..5713cd0 100644 --- a/guifunct.py +++ b/guifunct.py @@ -194,7 +194,7 @@ class PrefSimi ( wx.Dialog ): listsizer = wx.BoxSizer( wx.VERTICAL ) countsizer = wx.BoxSizer( wx.HORIZONTAL ) self.butcount = wx.Button(self, -1, _("count")) - self.textcount = wx.TextCtrl(self, -1, "", wx.DefaultPosition, wx.Size( 100,-1 ), wx.TE_READONLY ) + self.textcount = wx.TextCtrl(self, -1, "", wx.DefaultPosition, wx.Size( 100, 50 ), wx.TE_READONLY ) countsizer.Add(self.butcount, 0, wx.ALL, 5) countsizer.Add(self.textcount, 0, wx.ALL, 5 ) listsizer.Add(countsizer, 0, wx.ALL, 5) @@ -273,7 +273,7 @@ class PrefSimi ( wx.Dialog ): self.m_staticText5.Wrap( -1 ) fgSizer3.Add( self.m_staticText5, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) - choice3Choices = [ "dynamique", "statique", "3D", 'web2D', "web3D" ] + choice3Choices = [ "dynamique", "statique", "3D"]#, 'web2D', "web3D" ] self.choice3 = wx.Choice( self.m_panel2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, choice3Choices, 0 ) self.choice3.SetSelection( 0 ) @@ -813,7 +813,7 @@ class PrefSimi ( wx.Dialog ): self.comcheck.SetValue(self.paramsimi['com']) self.choix_com.SetSelection(self.paramsimi['communities']) self.halo.SetValue(self.paramsimi['halo']) - self.check_curved.SetValue(self.paramsimi.get('edgecurved', True)) + self.check_curved.SetValue(self.paramsimi.get('edgecurved', False)) if self.paramsimi.get('word', False) and self.paramsimi['first'] : self.choice2.SetSelection(5) diff --git a/iramuteq.py b/iramuteq.py index 79b15e5..3b00af8 100755 --- a/iramuteq.py +++ b/iramuteq.py @@ -299,7 +299,7 @@ class IraFrame(wx.Frame): item.SetBitmap(self.images_analyses['importdmi']) file_menu.Append(item) item = wx.MenuItem(file_menu, ID_merge, _('Merge graphs'), _('Merge graphs')) - file_menu.Append(item) + #file_menu.Append(item) item = wx.MenuItem(file_menu, ID_merge_clusters, _('Corpus from merge clusters'), _('Corpus from merge clusters')) file_menu.Append(item) @@ -985,7 +985,7 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, États-Unis.""" # action ou évènement ? def ShowAPane(self, panel): - print('ShowAPane') + #print('ShowAPane') for pane in self._mgr.GetAllPanes() : if not pane.IsToolbar() and pane.name != 'lefttree': pane.Hide() @@ -1361,13 +1361,13 @@ class IntroPanel(wx.Panel): label2 = wx.StaticText(PanelPres, -1 , '\nVersion ' + ConfigGlob.get('DEFAULT', 'version') + '\n') label2.SetForegroundColour(txtcolour) label2.SetBackgroundColour(bckgrdcolor) - self.hyper2 = hl.HyperLinkCtrl(PanelPres, wx.ID_ANY, "REPERE", URL="http://repere.no-ip.org/") - self.hyper2.SetColours(linkcolor, linkcolor, "RED") - self.hyper2.SetBackgroundColour(bckgrdcolor) - self.hyper2.EnableRollover(True) - self.hyper2.SetUnderlines(False, False, True) - self.hyper2.SetBold(True) - self.hyper2.UpdateLink() + #self.hyper2 = hl.HyperLinkCtrl(PanelPres, wx.ID_ANY, "REPERE", URL="http://repere.no-ip.org/") + #self.hyper2.SetColours(linkcolor, linkcolor, "RED") + #self.hyper2.SetBackgroundColour(bckgrdcolor) + #self.hyper2.EnableRollover(True) + #self.hyper2.SetUnderlines(False, False, True) + #self.hyper2.SetBold(True) + #self.hyper2.UpdateLink() label_lerass = wx.StaticText(PanelPres, -1, 'Laboratoire ') label_lerass.SetForegroundColour(txtcolour) label_lerass.SetBackgroundColour(bckgrdcolor) @@ -1389,13 +1389,16 @@ class IntroPanel(wx.Panel): python_img = wx.Image(os.path.join(ImagePath,'python-logo.jpg'), wx.BITMAP_TYPE_ANY).ConvertToBitmap() r_img = wx.Image(os.path.join(ImagePath,'Rlogo.jpg'), wx.BITMAP_TYPE_ANY).ConvertToBitmap() lexique_img = wx.Image(os.path.join(ImagePath,'LexTexte4.jpg'), wx.BITMAP_TYPE_ANY).ConvertToBitmap() + sms_img = wx.Image(os.path.join(ImagePath,'logo_sms.jpg'), wx.BITMAP_TYPE_ANY).ConvertToBitmap() but_python = wx.BitmapButton(self, -1, python_img) but_lexique = wx.BitmapButton(self, -1, lexique_img) but_r = wx.BitmapButton(self, -1, r_img) + but_sms = wx.BitmapButton(self, -1, sms_img) self.Bind(wx.EVT_BUTTON, self.OnPython, but_python) self.Bind(wx.EVT_BUTTON, self.OnLexique, but_lexique) self.Bind(wx.EVT_BUTTON, self.OnR, but_r) - grid_sizer_1.Add(self.hyper2, 0, wx.EXPAND | wx.ALIGN_CENTER_HORIZONTAL, 0) + self.Bind(wx.EVT_BUTTON, self.OnSMS, but_sms) + #grid_sizer_1.Add(self.hyper2, 0, wx.EXPAND | wx.ALIGN_CENTER_HORIZONTAL, 0) grid_sizer_3.Add(label_lerass, 0, wx.EXPAND | wx.ALIGN_CENTER_HORIZONTAL, 0) grid_sizer_3.Add(self.hyper_lerass, 0, wx.EXPAND | wx.ALIGN_CENTER_HORIZONTAL, 0) sizer4.Add(label_1, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL, 5) @@ -1415,6 +1418,7 @@ class IntroPanel(wx.Panel): grid_sizer_2.Add(but_python, 1, wx.ALIGN_BOTTOM) grid_sizer_2.Add(but_lexique, 1, wx.ALIGN_BOTTOM) grid_sizer_2.Add(but_r, 1, wx.ALIGN_BOTTOM) + grid_sizer_2.Add(but_sms, 1, wx.ALIGN_BOTTOM) sizer1.Add(PanelPres, 0, wx.EXPAND |wx.ALL, 10) sizer1.Add(grid_sizer_2, 2, wx.ALIGN_CENTER_HORIZONTAL|wx.ALL, 1) self.SetSizer(sizer1) @@ -1429,6 +1433,9 @@ class IntroPanel(wx.Panel): def OnR(self,evt): webbrowser.open('http://www.r-project.org') + def OnSMS(self, evt): + webbrowser.open('https://sms.univ-tlse2.fr') + #-------------------------------------------------------------------- # ecran d'accueil diff --git a/layout.py b/layout.py index 67411fc..79f91e4 100644 --- a/layout.py +++ b/layout.py @@ -1247,7 +1247,7 @@ class SimiLayout(DefaultTextLayout) : self.graphpan = GraphPanelSimi(self.tabsimi, self.pathout, list_graph) self.graphpan.Bind(wx.EVT_BUTTON, self.redosimi, self.graphpan.butafc) self.graphpan.Bind(wx.EVT_BUTTON, self.export, self.graphpan.butexport) - self.graphpan.Bind(wx.EVT_BUTTON, self.blender, self.graphpan.butblender) + #self.graphpan.Bind(wx.EVT_BUTTON, self.blender, self.graphpan.butblender) self.tabsimi.AddPage(self.graphpan, _('Graph')) self.ira.nb.AddPage(self.tabsimi, _('Graph analysis')) self.ira.ShowTab(True) @@ -1436,7 +1436,7 @@ class SimiMatLayout(DefaultMatLayout) : self.graphpan = GraphPanelSimi(self.tabsimi, self.pathout, list_graph) self.graphpan.Bind(wx.EVT_BUTTON, self.redosimi, self.graphpan.butafc) self.graphpan.Bind(wx.EVT_BUTTON, self.export, self.graphpan.butexport) - self.graphpan.Bind(wx.EVT_BUTTON, self.blender, self.graphpan.butblender) + #self.graphpan.Bind(wx.EVT_BUTTON, self.blender, self.graphpan.butblender) self.tabsimi.AddPage(self.graphpan, _('Graph')) self.tabsimi.parametres = self.parametres self.parent.nb.AddPage(self.tabsimi, ' - '.join([_('Graph analysis'), self.parametres['name']])) @@ -1630,10 +1630,10 @@ class GraphPanelSimi(wx.Panel): self.butafc = wx.BitmapButton(self, -1, afc_img) export_img = wx.Image(os.path.join(self.ira.images_path,'button_export.jpg'), wx.BITMAP_TYPE_ANY).ConvertToBitmap() self.butexport = wx.BitmapButton(self, -1, export_img) - blender_img = wx.Image(os.path.join(self.ira.images_path,'button_blender.png'), wx.BITMAP_TYPE_ANY) - blender_img.Rescale(32,32) - blender_img = blender_img.ConvertToBitmap() - self.butblender = wx.BitmapButton(self, -1, blender_img) + #blender_img = wx.Image(os.path.join(self.ira.images_path,'button_blender.png'), wx.BITMAP_TYPE_ANY) + #blender_img.Rescale(32,32) + #blender_img = blender_img.ConvertToBitmap() + #self.butblender = wx.BitmapButton(self, -1, blender_img) for i in range(0,len(list_graph)): if os.path.exists(os.path.join(self.dirout,list_graph[i][0])) : filename, ext = os.path.splitext(list_graph[i][0]) @@ -1641,7 +1641,7 @@ class GraphPanelSimi(wx.Panel): self.listimg.append(hl.HyperLinkCtrl(self.panel_1, -1, os.path.join(self.dirout,list_graph[i][0]), URL=os.path.join(self.dirout,list_graph[i][0]))) else : self.listimg.append(wx.StaticBitmap(self.panel_1, -1, wx.Bitmap(os.path.join(self.dirout,list_graph[i][0]), wx.BITMAP_TYPE_ANY))) - self.labels.append(wx.StaticText(self.panel_1, -1, list_graph[i][1])) + self.labels.append(wx.StaticText(self.panel_1, -1, list_graph[i][1] + '')) self.panel_1.Bind(wx.EVT_MOTION, self.onMouseMove) self.__set_properties() self.__do_layout() @@ -1658,7 +1658,7 @@ class GraphPanelSimi(wx.Panel): self.sizer_3 = wx.BoxSizer(wx.VERTICAL) self.sizer_2.Add(self.butafc, 0, 0, 0) self.sizer_2.Add(self.butexport, 0, 0, 0) - self.sizer_2.Add(self.butblender, 0, 0, 0) + #self.sizer_2.Add(self.butblender, 0, 0, 0) for i in range(0, len(self.listimg)): self.sizer_3.Add(self.listimg[i], 0, wx.ALIGN_CENTER_HORIZONTAL, 0) self.sizer_3.Add(self.labels[i], 0, wx.ALIGN_CENTER_HORIZONTAL, 0) diff --git a/listlex.py b/listlex.py index 3a11826..41fa727 100644 --- a/listlex.py +++ b/listlex.py @@ -39,6 +39,8 @@ from PrintRScript import barplot from dialog import SearchDial, message, BarGraphDialog, BarFrame + + class ListForSpec(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin, listmix.ColumnSorterMixin): def __init__(self, parent,gparent, dlist = {}, first = [], usefirst = False, menu = True): @@ -70,11 +72,11 @@ class ListForSpec(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin, listmix.ColumnSor exec(s) self.SetImageList(self.il, wx.IMAGE_LIST_SMALL) tID = wx.NewId() - self.attr1 = wx.ListItemAttr() + self.attr1 = wx.ItemAttr() self.attr1.SetBackgroundColour((230, 230, 230)) - self.attr2 = wx.ListItemAttr() + self.attr2 = wx.ItemAttr() self.attr2.SetBackgroundColour("light blue") - self.attrselected = wx.ListItemAttr() + self.attrselected = wx.ItemAttr() self.attrselected.SetBackgroundColour("red") self.selected = {} i=0 @@ -89,14 +91,14 @@ class ListForSpec(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin, listmix.ColumnSor self.SetItemCount(len(self.dlist)) listmix.ColumnSorterMixin.__init__(self, len(self.first) + 1) self.SortListItems(1, False) - #----------------------------------------------------------------------------------------- + #----------------------------------------------------------------------------------------- self.Bind(wx.EVT_LIST_ITEM_SELECTED, self.OnItemSelected, self) self.Bind(wx.EVT_LIST_ITEM_ACTIVATED , self.OnPopupTwo, self) # for wxMSW self.Bind(wx.EVT_COMMAND_RIGHT_CLICK, self.OnRightClick) # for wxGTK self.Bind(wx.EVT_RIGHT_UP, self.OnRightClick) -#----------------------------------------------------------------------------------------- +#----------------------------------------------------------------------------------------- def OnGetItemColumnImage(self, item, col): return -1 @@ -144,7 +146,7 @@ class ListForSpec(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin, listmix.ColumnSor # Used by the ColumnSorterMixin, see wx/lib/mixins/listctrl.py def GetSortImages(self): return (self.sm_dn, self.sm_up) - + def OnRightDown(self, event): x = event.GetX() y = event.GetY() @@ -167,7 +169,7 @@ class ListForSpec(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin, listmix.ColumnSor index=self.itemIndexMap[item] s = self.itemDataMap[index] return s - + # def SortItems(self,sorter=cmp): # modification pour python 3 def SortItems(self, sorter=None): listTemp = sorted(self.itemDataMap.items(), @@ -186,7 +188,7 @@ class ListForSpec(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin, listmix.ColumnSor self.dial.CenterOnParent() self.dial.Show() #self.dial.Destroy() - + def OnRightClick(self, event): if self.menu : # only do this part the first time so the events are only bound once @@ -289,7 +291,7 @@ class ListForSpec(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin, listmix.ColumnSor items = dict([[i, '
'.join([ucis_txt[i], '
score : %.2f

' % ntab2[i][0], ucestxt[i]])] for i in range(0,len(ucestxt))]) win = message(self, items, ' - '.join([_("Typical text segments"), "%s" % self.first[ind]]), (900, 600)) win.Show(True) - + def OnPopupTwo(self, event): if 'nb' in dir(self.parent) : activenotebook = self.parent.nb.GetSelection() @@ -353,7 +355,7 @@ class ListForSpec(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin, listmix.ColumnSor spec.Tgen.glob <- spec.Tgen.glob[[1]][((nrow(Tgen.table)-ncol(Tgen.table))+1):nrow(Tgen.table),] di <- spec.Tgen.glob """ - txt = barplot('', '', '', self.parent.RscriptsPath['Rgraph'], tmpgraph, intxt = intxt) + txt = barplot('', '', '', self.parent.RscriptsPath['Rgraph'], tmpgraph, intxt = intxt) # ecriture du script dans un fichier tmpscript = tempfile.mktemp(dir=self.parent.TEMPDIR) with open(tmpscript, 'w') as f : @@ -365,7 +367,7 @@ class ListForSpec(wx.ListCtrl, listmix.ListCtrlAutoWidthMixin, listmix.ColumnSor txt = "" % tmpgraph win.HtmlPage.SetPage(txt) win.Show(True) - + def OnTgenDetails(self, evt): if 'nb' in dir(self.parent) : activenotebook = self.parent.nb.GetSelection() diff --git a/textreinert.py b/textreinert.py index 30ec959..12498ee 100644 --- a/textreinert.py +++ b/textreinert.py @@ -59,9 +59,7 @@ class Reinert(AnalyseText) : self.print_graph_files() def preferences(self) : - print('parametres en entree config alceste', self.parametres) parametres = DoConf(self.parent.ConfigPath['reinert']).getoptions('ALCESTE') - print('parametres apres doconf', parametres) parametres['corpus'] = self.corpus parametres['pathout'] = self.pathout parametres['lem'] = self.parametres['lem'] @@ -82,7 +80,6 @@ class Reinert(AnalyseText) : parametres['mode.patate'] = self.dial.check_patate.GetValue() DoConf(self.parent.ConfigPath['reinert']).makeoptions(['ALCESTE'], [parametres]) self.dial.Destroy() - print(parametres) self.parametres.update(parametres) return self.parametres else : @@ -108,7 +105,7 @@ class Reinert(AnalyseText) : chd_graph_list.append([os.path.basename(self.pathout['dendro2']), 'dendrogramme à partir de chd2']) chd_graph_list.append([os.path.basename(self.pathout['arbre1']), 'chd1']) if self.parametres['classif_mode'] == 0 : - chd_graph_list.append([os.path.basename(self.pathout['arbre2']), 'chd2']) + chd_graph_list.append([os.path.basename(self.pathout['arbre2']), 'chd2']) print_liste(self.pathout['liste_graph_afc'], afc_graph_list) print_liste(self.pathout['liste_graph_chd'], chd_graph_list) PrintRapport(self, self.corpus, self.parametres) @@ -155,4 +152,4 @@ class ReDoProfile(AnalyseText): self.doanalyse() def Rscript(self) : - script = ReDoProfScript(self) + script = ReDoProfScript(self) diff --git a/textsimi.py b/textsimi.py index 08c9f63..41de6eb 100644 --- a/textsimi.py +++ b/textsimi.py @@ -25,23 +25,23 @@ from chemins import ffr, simipath from analysetxt import AnalyseText from guifunct import PrepSimi from functions import indices_simi, progressbar, treat_var_mod, read_list_file, print_liste, DoConf, exec_rcode, check_Rresult -from PrintRScript import PrintSimiScript +from PrintRScript import PrintSimiScript log = logging.getLogger('iramuteq.textsimi') -class SimiTxt(AnalyseText): +class SimiTxt(AnalyseText): def doanalyse(self) : self.parametres['type'] = 'simitxt' self.pathout.basefiles(simipath) self.indices = indices_simi - if self.dlg : # quel est le lien ??? + if self.dlg : self.makesimiparam() #FIXME self.actives = self.corpus.make_actives_limit(3) - dictcol = dict([[i, [act, self.corpus.getlemeff(act)]] for i, act in enumerate(self.actives)]) + dictcol = dict([[i, [act, self.corpus.getlemeff(act)]] for i, act in enumerate(self.actives)]) continu = False if self.dlg : self.listet = self.corpus.make_etoiles() @@ -72,7 +72,7 @@ class SimiTxt(AnalyseText): if self.parametres['type_graph'] == 1: if self.parametres['svg'] : filename, ext = os.path.splitext(script.filename) - fileout = filename + '.svg' + fileout = filename + '.svg' else : fileout = script.filename if os.path.exists(self.pathout['liste_graph']): @@ -155,7 +155,7 @@ class SimiFromCluster(SimiTxt) : self.makesimiparam() if 'bystar' in self.parametres : del self.parametres['bystar'] - dictcol = dict([[i, [act, self.corpus.getlemclustereff(act, self.numcluster)]] for i, act in enumerate(self.actives)]) + dictcol = dict([[i, [act, self.corpus.getlemclustereff(act, self.numcluster)]] for i, act in enumerate(self.actives)]) continu = True if self.dlg : # self.dlg.Destroy() @@ -179,7 +179,7 @@ class SimiFromCluster(SimiTxt) : if self.parametres['type_graph'] == 1: if self.parametres['svg'] : filename, ext = os.path.splitext(script.filename) - fileout = filename + '.svg' + fileout = filename + '.svg' else : fileout = script.filename if os.path.exists(self.pathout['liste_graph']): @@ -189,7 +189,7 @@ class SimiFromCluster(SimiTxt) : graph_simi = [[os.path.basename(fileout), script.txtgraph]] print_liste(self.pathout['liste_graph'], graph_simi) self.dlg.Destroy() - else : + else : return False def makefiles(self) :