20 Dec
2002
20 Dec
'02
2:09 p.m.
I'm distributing a Python application which has to install and use a data file. In my setup.py I include the following option: setup (name = "MyProg", ... data_files = [('config', ['data.rc'])], scripts = ['doit'], ... ) When I run "setup.py install --prefix=/foo/bar", setup will copy my data file to /foo/bar/config/data.rc. However my Python program needs to know how to find that file. How does the "doit" script find out the installation directory so that it can compute the absolute path to the data.rc file? Thanks, --Tessa