self.OpenText()
def OnViewData(self, event):
- print self.type
- print self.DataTxt
if self.type == "Data":
if not self.DataPop :
self.Sheet.Populate(self.content)
self.tree.OnItemAppend(corpus.parametres)
OpenAnalyse(self, corpus.parametres)
except :
+ dlg.Destroy()
BugReport(self)
else :
count = 1
self.history.rmtab(page.parametres)
self.tree.CloseItem(uuid = page.parametres['uuid'])
TabTitle = self.nb.GetPageText(self.nb.GetSelection())
-# if self.DictTab != {} :
-# if TabTitle in self.DictTab :
-# ListFile=self.DictTab[TabTitle]
-# if False in ListFile:
-# msg = u"""
-# Certains résultats ne sont pas enregistrer.
-# Voulez-vous fermer quand même ?"""
-# dlg = wx.MessageDialog(self, msg, "Sauvegarde",wx.YES_NO | wx.NO_DEFAULT | wx.ICON_QUESTION)
-#
-# dlg.CenterOnParent()
-# if dlg.ShowModal() in [wx.ID_NO, wx.ID_CANCEL]:
-# remove = False
-# evt.Veto()
-# dlg.Destroy()
-# else :
-# for f in ListFile[1:] :
-# print 'remove', f
-# os.remove(f)
-# remove = True
-# dlg.Destroy()
-# elif True in ListFile :
-# remove = True
-# if remove:
-# del self.DictTab[TabTitle]
-# else :
-# self.LastTabClose()
-# else :
-# remove = True
+
if self.nb.GetPageCount() == 1 and not notebook :
self.LastTabClose()
else :
self.ShowAPane("Intro_Text")
-# def OnSaveTabAs(self, event):
-# SelectTab = self.nb.GetSelection()
-# TabTitle = self.nb.GetPageText(SelectTab)
-# FileToSave = self.DictTab[TabTitle]
-# NewListFile = []
-# dlg = wx.FileDialog(
-# self, message="Enregistrer sous...", defaultDir=os.getcwd(),
-# defaultFile="resultat.html", wildcard="Tous les fichiers|*", style=wx.SAVE | wx.OVERWRITE_PROMPT
-# )
-# dlg.SetFilterIndex(2)
-# dlg.CenterOnParent()
-#
-# if dlg.ShowModal() == wx.ID_OK:
-# Path = dlg.GetPath()
-# Dirname = os.path.dirname(Path)
-# Filename = dlg.GetFilename()
-# else :
-# Path = False
-# dlg.Destroy()
-# if Path:
-# shutil.copyfile(FileToSave[-1], Path)
-# os.remove(FileToSave[len(FileToSave) - 1])
-# NewListFile.append(True)
-# NewListFile.append(Path)
-# for f in FileToSave[1:-1] :
-# Fileout = os.path.join(Dirname, os.path.basename(f))
-# shutil.copyfile(f, Fileout)
-# NewListFile.append(Fileout)
-# os.remove(f)
-# TabText = Filename
-# self.DictTab[TabText] = NewListFile
-# del self.DictTab[TabTitle]
-# self.nb.SetPageText(SelectTab, TabText)
-
def GetStartPosition(self):
self.x = self.x + 20
parametres['type'] = analyse_type
else :
parametres = {'type' : analyse_type}
- #try :
- print 'plus de bug@@@@@@@@@@@@@@@@@@@@@@'
- analyse(self, matrix, parametres = parametres, dlg = dlgnb)
- #except:
- # BugReport(self)
+ try :
+ #print 'plus de bug@@@@@@@@@@@@@@@@@@@@@@'
+ analyse(self, matrix, parametres = parametres, dlg = dlgnb)
+ except:
+ BugReport(self)
def OnFreq(self, event, matrix = None):
self.analyse_matrix(Frequences, analyse_type = 'freq', matrix = matrix, dlgnb = 3)
def doopen(self, corpus) :
if self.conf['type'] == 'corpus' :
- #self.parent.ShowMenu(_("Text analysis"))
OpenCorpus(self.parent, self.conf)
elif self.conf['type'] == 'stat' :
- #self.parent.ShowMenu(_("Text analysis"))
StatLayout(self.parent, corpus, self.conf)
elif self.conf['type'] == 'spec' :
- #self.parent.ShowMenu(_("Text analysis"))
dolexlayout(self.parent, corpus, self.conf)
elif self.conf['type'] == 'alceste' :
- #self.parent.ShowMenu(_("Text analysis"))
OpenCHDS(self.parent, corpus, self.conf, Alceste = True)
elif self.conf['type'] == 'simitxt' or self.conf['type'] == 'clustersimitxt' :
- #self.parent.ShowMenu(_("Text analysis"))
SimiLayout(self.parent, corpus, self.conf)
elif self.conf['type'] == 'wordcloud' or self.conf['type'] == 'clustercloud':
- #self.parent.ShowMenu(_("Text analysis"))
WordCloudLayout(self.parent, corpus, self.conf)
elif self.conf['type'] == 'reinertmatrix' :
- #self.parent.ShowMenu(_("Spreadsheet analysis"))
OpenCHDS(self.parent, corpus, self.conf, Alceste = False)
elif self.conf['type'] == 'simimatrix' :
- #self.parent.ShowMenu(_("Spreadsheet analysis"))
SimiMatLayout(self.parent, corpus, self.conf)
elif self.conf['type'] == 'proto' :
ProtoLayout(self.parent, corpus, self.conf)