[Biopython-dev] [biopython] Missing DTD files (#260)

Peter Cock p.j.a.cock at googlemail.com
Mon Dec 9 10:13:14 UTC 2013

On Mon, Dec 9, 2013 at 6:33 AM, Michiel de Hoon <mjldehoon at yahoo.com> wrote:
> Current we are using os.path.expanduser('~') /.biopython/Bio/Entrez/DTDs to look for locally stored DTDs.
> This should work on Windows also.

Well partly - it would create a "scary" .biopython folder
which would NOT be hidden by default. On Windows
we could deliberately mark that folder as hidden (a
file system attribute, used instead of the leading dot
convention from Unix). However, I think we should
really be using something under:

$HOME\Local Settings\Application Data

A little research might be needed for how to get that
setting (if possible without reading the registry and the
additional Python dependency that would entail).

> Then I would suggest the following if a DTD file is missing:
> 1) Print a non-scary warning message that we will attempt to download the DTD;
> 2) Download the DTD;
> 3) Try to store it in the local DTD directory. If this fails (e.g. due to file permissions or whatnot), print another warning message;
> 4) Use the downloaded DTD to parse the XML.
> Any final objections?

Only with regard to the location of the cache on Windows.


More information about the Biopython-dev mailing list