Frans Englich wrote:
This is silly. How do I access data files I've installed with distutils? In a portable, generic way, I want to find out what is the following path on most systems:

/usr/local/lib/python2.4/lib/site-packages/foo/bar.txt

Assuming your module is also in site-packages/foo, I would use:

import os
filename = os.path.join(os.path.dirname(__file__), 'bar.txt')
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to