pKaTool/pKacalc_interface.py
def add_file(self,event=None):
        """Browse for another file to add to self.included_files"""
        import os
        newfilename=tkFileDialog.askopenfilename(defaultextension='.mol2',
                                                 initialdir=os.getcwd(),
                                                 filetypes=[("Mol2 file",'*.mol2'),
                                                            ("PDB file","*.pdb"),
                                                            ("All files","*.*")],
                                                 parent=self.groupwin)
        if not newfilename:
            return

        ftype='Protein'
        if os.path.isfile(newfilename):
            if newfilename[-4:].lower()=='mol2':
                ftype='Ligand'
            #
            self.files_included.append([newfilename,ftype])
            self.print_included()
        return
Browse for another file to add to self.included_files
Browse for another file to add to self.included_files
Browse for another file to add to self . included_files
def add_file(self,event=None):
        import os
        newfilename=tkFileDialog.askopenfilename(defaultextension='.mol2',
                                                 initialdir=os.getcwd(),
                                                 filetypes=[("Mol2 file",'*.mol2'),
                                                            ("PDB file","*.pdb"),
                                                            ("All files","*.*")],
                                                 parent=self.groupwin)
        if not newfilename:
            return
        ftype='Protein'
        if os.path.isfile(newfilename):
            if newfilename[-4:].lower()=='mol2':
                ftype='Ligand'
            self.files_included.append([newfilename,ftype])
            self.print_included()
        return
def add_file ( self , event = None ) : import os newfilename = tkFileDialog . askopenfilename ( defaultextension = '.mol2' , initialdir = os . getcwd ( ) , filetypes = [ ( "Mol2 file" , '*.mol2' ) , ( "PDB file" , "*.pdb" ) , ( "All files" , "*.*" ) ] , parent = self . groupwin ) if not newfilename : return ftype = 'Protein' if os . path . isfile ( newfilename ) : if newfilename [ - 4 : ] . lower ( ) == 'mol2' : ftype = 'Ligand' self . files_included . append ( [ newfilename , ftype ] ) self . print_included ( ) return
Browse for another file to add to self.included_files
Browse for another file to add to self . included_files
"""Browse for another file to add to self.included_files""" #
self
event