indices_simi = [u'cooccurrence' ,'pourcentage de cooccurrence',u'Russel',u'Jaccard', 'Kulczynski1', 'Kulczynski2', 'Mountford', 'Fager', 'simple matching', 'Hamman', 'Faith', 'Tanimoto', 'Dice', 'Phi', 'Stiles', 'Michael', 'Mozley', 'Yule', 'Yule2', 'Ochiai', 'Simpson', 'Braun-Blanquet','Chi-squared', 'Phi-squared', 'Tschuprow', 'Cramer', 'Pearson', 'binomial']
+
+def open_folder(folder):
+ if sys.platform == "win32":
+ os.startfile(folder)
+ else:
+ opener ="open" if sys.platform == "darwin" else "xdg-open"
+ call([opener, folder])
+
def normpath_win32(path) :
if not sys.platform == 'win32' :
return path
def rmtab(self, analyse) :
del self.opened[analyse['uuid']]
+
+ def update(self, analyse) :
+ if 'matrix_name' in analyse :
+ self.matrixanalyse[analyse['uuid']].update(analyse)
+ elif 'corpus_name' in analyse :
+ self.corpus[analyse['uuid']].update(analyse)
+ elif 'corpus' in analyse :
+ self.analyses[analyse['uuid']].update(analyse)
+ else :
+ toupdate = [an for an in self.matrixanalyse[analyse['matrix']]['analyses'] if an['uuid'] == analyse['uuid']]
+ toupdate[0].update(analyse)
+ self.write()
+ self.read()
def clean(self) :
corpustodel = [corpus for corpus in self.history if not os.path.exists(corpus['ira'])]
class BugDialog(wx.Dialog):
def __init__(self, *args, **kwds):
# begin wxGlade: MyDialog.__init__
- kwds["style"] = wx.DEFAULT_DIALOG_STYLE
+ kwds["style"] = wx.DEFAULT_DIALOG_STYLE | wx.STAY_ON_TOP
kwds["size"] = wx.Size(500, 200)
wx.Dialog.__init__(self, *args, **kwds)
self.SetTitle(kwds['title'])
def progressbar(self, maxi) :
- if 'parent' in dir(self) :
- parent = self.parent
- else :
- parent = self
+ ira = wx.GetApp().GetTopWindow()
+ parent = ira
try :
maxi = int(maxi)
except :
maxi = 1
- return wx.ProgressDialog("Traitements",
+ prog = wx.ProgressDialog("Traitements",
"Veuillez patienter...",
maximum=maxi,
parent=parent,
style=wx.PD_APP_MODAL | wx.PD_AUTO_HIDE | wx.PD_ELAPSED_TIME | wx.PD_CAN_ABORT
)
-
+ prog.SetSize((400,150))
+ prog.SetIcon(ira._icon)
+ return prog
def treat_var_mod(variables) :
var_mod = {}