txt += u'*************************************\n'
txt += '\n'.join(excTb).replace(' ', ' ')
txt += excName + '\n'
- txt += exc
+ txt += `exc`
title = "Bug"
dial = BugDialog(parent, **{'title' : title})
else :
parent.lexique = ReadDicoAsDico(filein)
else :
- parent.lexique = {}
+ if filein is None :
+ parent.lexique = {}
+ else :
+ parent.lexique = ReadDicoAsDico(filein)
def ReadList(filein, encoding = sys.getdefaultencoding(), sep = ';'):
#file = open(filein)
import xlrd
import ooolib
import os
-import tempfile
+from copy import copy
import re
import htmlentitydefs
import shelve
def copymatrix(tableau):
log.info('copy matrix')
copymat = Tableau(tableau.parent, parametres = tableau.parametres)
- copymat.linecontent = tableau.linecontent
- copymat.csvtable = tableau.csvtable
- copymat.pathout = tableau.pathout
- copymat.colnames = tableau.colnames
- copymat.rownb = tableau.rownb
- copymat.colnb = tableau.colnb
+ copymat.linecontent = copy(tableau.linecontent)
+ copymat.csvtable = copy(tableau.csvtable)
+ copymat.pathout = copy(tableau.pathout)
+ copymat.colnames = copy(tableau.colnames)
+ copymat.rownb = copy(tableau.rownb)
+ copymat.colnb = copy(tableau.colnb)
if copymat.csvtable is None :
copymat.open()
return copymat
self.read_ods()
self.parametres['csvfile'] = os.path.join(self.parametres['pathout'], 'csvfile.csv')
self.make_tmpfile()
+ print self.parametres
DoConf().makeoptions(['matrix'],[self.parametres], self.parametres['ira'])
self.parent.history.addMatrix(self.parametres)
+
+ def make_content_simple(self):
+ self.parametres['csvfile'] = os.path.join(self.parametres['pathout'], 'csvfile.csv')
+ self.make_tmpfile()
+ DoConf().makeoptions(['matrix'],[self.parametres], self.parametres['ira'])
+ self.parent.history.addMatrix(self.parametres)
def read_xls(self) :
#FIXME : encodage
self.corpus.make_and_write_sparse_matrix_from_uci(self.actives, self.pathout['TableUc1'], self.pathout['listeuce1'])
uci = True
Rscript = self.printRscript()
- self.doR(Rscript, dlg=self.dlg, message='CHD...')
-
+ result = self.doR(Rscript, dlg=self.dlg, message='CHD...')
+ if not result :
+ return 'NOK'
self.corpus.make_ucecl_from_R(self.pathout['uce'])
self.corpus.make_and_write_profile(self.actives, self.corpus.lc, self.pathout['Contout'], uci = uci)
self.sup, lim = self.corpus.make_actives_nb(self.parametres['max_actives'], 2)
self.SetItemBold(item, bold)
self.SelectItem(item)
- def OnItemAppend(self, item):
+ def OnItemAppend(self, item, select = True):
if 'corpus_name' in item :
child = self.InsertItem(self.textroot, 0, item['corpus_name'])
else :
child = self.InsertItem(self.matroot, 0, item['matrix_name'])
self.SetPyData(child, item)
- self.history.addtab(item)
if item['type'] in self.ild :
img = self.ild[item['type']]
else :
img = 24
self.SetItemImage(child, img, CT.TreeItemIcon_Normal)
self.SetItemImage(child, img, CT.TreeItemIcon_Expanded)
- self.SetItemBold(child, True)
+ if select :
+ self.history.addtab(item)
+ self.SetItemBold(child, True)
#dlg = wx.TextEntryDialog(self, "Please Enter The New Item Name", 'Item Naming', 'Python')