PEATDB/PEATApp.py
def fetchPDB(self):
        """Allow user to fetch a pdb file from net and store to record"""
        mpDlg = MultipleValDialog(title='Fetch PDB',
                                    initialvalues=('', self.DB.getRecs()),
                                    labels=('pdb id','record'),
                                    types=('string','list'),
                                    parent=self.main)

        if mpDlg.result == True:
            pdbid = mpDlg.results[0]
            recname = mpDlg.results[1]

        stream = DBActions.fetchPDB(pdbid)
        if stream == None:
            tkMessageBox.showinfo('info',
                                  'failed to retrieve the structure')
            return
        DBActions.addPDBFile(self.DB, recname, pdbdata=stream, pdbname=pdbid)
        self.updateTable()
        return
Allow user to fetch a pdb file from net and store to record
Allow user to fetch a pdb file from net and store to record
Allow user to fetch a pdb file from net and store to record
def fetchPDB(self):
        mpDlg = MultipleValDialog(title='Fetch PDB',
                                    initialvalues=('', self.DB.getRecs()),
                                    labels=('pdb id','record'),
                                    types=('string','list'),
                                    parent=self.main)
        if mpDlg.result == True:
            pdbid = mpDlg.results[0]
            recname = mpDlg.results[1]
        stream = DBActions.fetchPDB(pdbid)
        if stream == None:
            tkMessageBox.showinfo('info',
                                  'failed to retrieve the structure')
            return
        DBActions.addPDBFile(self.DB, recname, pdbdata=stream, pdbname=pdbid)
        self.updateTable()
        return
def fetchPDB ( self ) : mpDlg = MultipleValDialog ( title = 'Fetch PDB' , initialvalues = ( '' , self . DB . getRecs ( ) ) , labels = ( 'pdb id' , 'record' ) , types = ( 'string' , 'list' ) , parent = self . main ) if mpDlg . result == True : pdbid = mpDlg . results [ 0 ] recname = mpDlg . results [ 1 ] stream = DBActions . fetchPDB ( pdbid ) if stream == None : tkMessageBox . showinfo ( 'info' , 'failed to retrieve the structure' ) return DBActions . addPDBFile ( self . DB , recname , pdbdata = stream , pdbname = pdbid ) self . updateTable ( ) return
Allow user to fetch a pdb file from net and store to record
Allow user to fetch a pdb file from net and store to record
"""Allow user to fetch a pdb file from net and store to record"""
self