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

Tiago Antão tiagoantao at gmail.com
Mon Dec 9 14:40:12 UTC 2013


Hi,

I do not have access here to a windows machine (later in the day I can).
But:
 /.biopython/Bio/Entrez/DTDs

should not be correct. You probably want to replace "/" with os.sep, say:
os.sep.join([".biopython", "Bio", "Entrez", "DTDs"])

which will give you
\.biopython\Bio\Entrez\DTDs


On 9 December 2013 14:20, Michiel de Hoon <mjldehoon at yahoo.com> wrote:

> Can somebody with a Windows computer check what os.path.expanduser('~')
> refers to on Windows? Or how matplotlib solves this on Windows (they are
> storing files under $HOME/.matplotlib on unix-like systems; I don't know
> what they use on Windows).
>
> Thanks,
> -Michiel.
>
>
> --------------------------------------------
> On Mon, 12/9/13, Peter Cock <p.j.a.cock at googlemail.com> wrote:
>
>  Subject: Re: [Biopython-dev] [biopython] Missing DTD files (#260)
>  To: "Michiel de Hoon" <mjldehoon at yahoo.com>
>  Cc: "Biopython-Dev Mailing List" <biopython-dev at lists.open-bio.org>
>  Date: Monday, December 9, 2013, 5:13 AM
>
>  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.
>
>  Peter
>
> _______________________________________________
> Biopython-dev mailing list
> Biopython-dev at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biopython-dev
>



-- 
"The truth may be out there, but the lies are already in your head" - Terry
Pratchett



More information about the Biopython-dev mailing list