[Biopython-dev] Accessing built-in data files

Tiago Antão tiagoantao at gmail.com
Mon Nov 19 16:05:13 UTC 2007

> If the data files are installed the data subdirectory of where your
> python are, can't your python files just load them using a relative path?

Relative to what? The current directory is where the user is (not the
biopython directory). I don't know where the biopython code is (read
below), as such I cannot compute a path relative to it.

> Am I missing something?

The question is: How do I determine where biopython is installed? Is
that possible from inside the running code, in runtime? If yes, then
all is sorted (I just don't know how to do that), if no then I can
only think of transversing the whole PYTHONPATH.

Yes, it should be relative to the code path - I agree with you. But
how one finds where the code is (from a bunch of possible
alternatives) in runtime?


More information about the Biopython-dev mailing list