- corpus = builder.doanalyse()
- self.history.add(corpus.parametres)
- self.tree.OnItemAppend(corpus.parametres)
- OpenAnalyse(self, corpus.parametres)
- #self.content = DoConf().totext(corpus.parametres)
-# parametres = DoConf(os.path.join(UserConfigPath,'corpus.cfg')).getoptions('corpus')
-# parametres['originalpath'] = self.filename
-#
-# parametres['pathout'] = PathOut(self.filename, 'corpus').dirout
-# dial = CorpusPref(self, parametres)
-# dial.CenterOnParent()
-# dial.txtpath.SetLabel(self.filename)
-# res = dial.ShowModal()
-# parametres = dial.doparametres()
-# print parametres
-# ReadLexique(self, lang = parametres['lang'])
-# self.expressions = ReadDicoAsDico(self.DictPath.get(parametres['lang'], 'french_exp'))
-# corpus = BuildFromAlceste(self.filename, parametres, self.lexique, self.expressions).corpus
- #self.corpus_encodage = dial.encodages[dial.list_encodages.GetSelection()][0]
- #self.corpus_lang = dial.langues[dial.choice_dict.GetSelection()]
- count = 1
- keepGoing = dlg.Update(count, u"Lecture du fichier")
-# try :
-# with codecs.open(self.filename, 'rU', self.corpus_encodage) as f:
-# self.content = f.read()
-# #self.content = self.content.replace('\r','\n')
-# except UnicodeDecodeError :
-# msg = u"Ce fichier ne semble pas être encodé en %s" % self.corpus_encodage
-# dial = wx.MessageDialog(self, msg, u"Problème d'encodage", wx.OK | wx.NO_DEFAULT | wx.ICON_WARNING)
-# dial.CenterOnParent()
-# res = dial.ShowModal()
-# dial.Destroy()
-# self.OpenText()
- self.ShowMenu(_("View"))
- self.ShowMenu(_("Text analysis"))
- self.ShowMenu(_(u"Spreadsheet analysis"), False)
- self.type = "Texte"
- self.DataTxt = False
- self.Text = ''
- count += 1
- keepGoing = dlg.Update(count, u"Chargement du dictionnaire")
- dlg.Destroy()
+ try :
+ corpus = builder.doanalyse()
+ self.history.add(corpus.parametres)
+ self.tree.OnItemAppend(corpus.parametres)
+ OpenAnalyse(self, corpus.parametres)
+ except :
+ dlg.Destroy()
+ BugReport(self)
+ else :
+ count = 1
+ keepGoing = dlg.Update(count, u"Lecture du fichier")
+ self.ShowMenu('view')
+ self.ShowMenu('text')
+ self.ShowMenu('matrix', False)
+ self.type = "Texte"
+ self.DataTxt = False
+ self.Text = ''
+ count += 1
+ keepGoing = dlg.Update(count, u"Chargement du dictionnaire")
+ dlg.Destroy()