pKaTool/pKaTool_main.py
def show_matrix_table(self,event=None):
        """Open a new window with the matrix for all selected groups"""
        details_win=Toplevel()
        import pKarun.pKa_general
        X=pKarun.pKa_general.pKanalyse()
        row=0
        order=sorted(self.matrix.keys())
        #
        # Insert table headings
        #
        column=0
        for key in ['dpKa units']+order:
            tl=Label(details_win,text=key,anchor='e',borderwidth=2,width=10,relief='ridge')
            tl.grid(row=row,column=column)
            column=column+1
        row=row+1
        #
        # Insert the data
        #
        for group in self.selected_groups:
            tl=Label(details_win,text=group,anchor='e',borderwidth=2,relief='ridge',width=10)
            tl.grid(row=row,column=0)
            column=1
            import math
            for key in order:
                if not self.matrix[group][key] is None:
                    text='%5.1f' %(self.matrix[group][key][0]/math.log(10))
                else:
                    text='%5s' %('Unknown')
                #
                # Fill the cell
                #
                tl=Label(details_win,text=text,anchor='e',borderwidth=2,width=10,relief='ridge')
                tl.grid(row=row,column=column)
                column=column+1
            #
            row=row+1
        
        return
Open a new window with the matrix for all selected groups
Open a new window with the matrix for all selected groups
Open a new window with the matrix for all selected groups
def show_matrix_table(self,event=None):
        details_win=Toplevel()
        import pKarun.pKa_general
        X=pKarun.pKa_general.pKanalyse()
        row=0
        order=sorted(self.matrix.keys())
         Insert table headings
        column=0
        for key in ['dpKa units']+order:
            tl=Label(details_win,text=key,anchor='e',borderwidth=2,width=10,relief='ridge')
            tl.grid(row=row,column=column)
            column=column+1
        row=row+1
         Insert the data
        for group in self.selected_groups:
            tl=Label(details_win,text=group,anchor='e',borderwidth=2,relief='ridge',width=10)
            tl.grid(row=row,column=0)
            column=1
            import math
            for key in order:
                if not self.matrix[group][key] is None:
                    text='%5.1f' %(self.matrix[group][key][0]/math.log(10))
                else:
                    text='%5s' %('Unknown')
                 Fill the cell
                tl=Label(details_win,text=text,anchor='e',borderwidth=2,width=10,relief='ridge')
                tl.grid(row=row,column=column)
                column=column+1
            row=row+1
        return
def show_matrix_table ( self , event = None ) : details_win = Toplevel ( ) import pKarun . pKa_general X = pKarun . pKa_general . pKanalyse ( ) row = 0 order = sorted ( self . matrix . keys ( ) ) column = 0 for key in [ 'dpKa units' ] + order : tl = Label ( details_win , text = key , anchor = 'e' , borderwidth = 2 , width = 10 , relief = 'ridge' ) tl . grid ( row = row , column = column ) column = column + 1 row = row + 1 for group in self . selected_groups : tl = Label ( details_win , text = group , anchor = 'e' , borderwidth = 2 , relief = 'ridge' , width = 10 ) tl . grid ( row = row , column = 0 ) column = 1 import math for key in order : if not self . matrix [ group ] [ key ] is None : text = '%5.1f' % ( self . matrix [ group ] [ key ] [ 0 ] / math . log ( 10 ) ) else : text = '%5s' % ( 'Unknown' ) tl = Label ( details_win , text = text , anchor = 'e' , borderwidth = 2 , width = 10 , relief = 'ridge' ) tl . grid ( row = row , column = column ) column = column + 1 row = row + 1 return
Open a new window with the matrix for all selected groups
Open a new window with the matrix for all selected groups
"""Open a new window with the matrix for all selected groups""" # # Insert table headings # # # Insert the data # # # Fill the cell # #
self
event