Logo Search packages:      
Sourcecode: python-biopython version File versions

def Bio::PDB::PDBList::PDBList::get_recent_filenames (   self  ) 

Returns names of the newest three weekly files (added,mod,obsolete).

Reads the directories with changed entries from the PDB server and
returns a tuple of three URL's to the files of new, modified and
obsolete entries from the most recent list. The directory with the
largest numerical name is used.
Returns None if something goes wrong.

Contents of the data/status dir (20031013 would be used);
drwxrwxr-x   2 1002     sysadmin     512 Oct  6 18:28 20031006
drwxrwxr-x   2 1002     sysadmin     512 Oct 14 02:14 20031013
-rw-r--r--   1 1002     sysadmin    1327 Mar 12  2001 README

Definition at line 62 of file PDBList.py.

00062                                   :
        """Returns names of the newest three weekly files (added,mod,obsolete).
        
        Reads the directories with changed entries from the PDB server and
        returns a tuple of three URL's to the files of new, modified and
        obsolete entries from the most recent list. The directory with the
        largest numerical name is used.
        Returns None if something goes wrong.
        
        Contents of the data/status dir (20031013 would be used);
drwxrwxr-x   2 1002     sysadmin     512 Oct  6 18:28 20031006
drwxrwxr-x   2 1002     sysadmin     512 Oct 14 02:14 20031013
-rw-r--r--   1 1002     sysadmin    1327 Mar 12  2001 README
        """     
        url = urllib.urlopen(self.pdb_server+'/pub/pdb/data/status/')
        file = url.readlines()
        maxdate = 0
        for l in file:
            try:
                # check if this is a valid date
                date = int(l[54:62])
                if date > maxdate: maxdate = date
            except:
                pass
        if maxdate>0:
            return self.get_filenames_by_date(str(maxdate))
        return None

    def get_filenames_by_date(self,date):


Generated by  Doxygen 1.6.0   Back to index