Merge branch 'master' of http://www.netdig.org/git/iramuteq
[iramuteq] / tabverges.py
1 #!/bin/env python
2 # -*- coding: utf-8 -*-
3 #Author: Pierre Ratinaud
4 #Copyright (c) 2012 Pierre Ratinaud
5 #Lisense: GNU GPL
6
7 import os
8 import string
9 import wx
10 import os
11 import sys
12 import tempfile
13 from chemins import ffr,FFF
14 import wx.lib.sized_controls as sc
15 from time import sleep
16 from functions import exec_rcode, check_Rresult
17 from dialog import ChiDialog
18
19 class Verges :
20     def __init__(self,parent):
21         self.parent = parent
22         self.tableau = self.parent.tableau
23         chioption = { 'valobs' : True,
24                       'valtheo' : True,
25                       'resi' : False,
26                       'contrib' : True,
27                       'pourcent' : False,
28                       'pourcentl' : True,
29                       'pourcentc' : True,
30                       'graph' : True,
31                       }
32         self.dlg = ChiDialog(parent, -1, u"Chi2", chioption, size=(400, 350),
33                      style = wx.DEFAULT_DIALOG_STYLE
34                      )
35         self.dlg.CenterOnParent()
36         self.check_val()
37
38     def check_val(self) :
39         self.val = self.dlg.ShowModal()
40         if self.val==wx.ID_OK :
41                 self.ColSel1 = self.dlg.list_box_1.GetSelections()
42                 self.ColSel2 = self.dlg.list_box_2.GetSelections()
43                 if len(self.ColSel1) != len(self.ColSel2) :
44                     print 'pas meme taille'
45                     self.check_val()
46                 else :
47                     self.dotable()
48
49     def dotable(self) :
50         table_assoc = self.tableau.select_col(self.ColSel1)
51         table_rank = self.tableau.select_col(self.ColSel2)
52         
53         
54