[GRASS-user] Where to store supplementary file for GRASS python script

Johannes Radinger JRadinger at gmx.at
Wed Oct 19 06:56:44 EDT 2011


I have a python-script which involves various
packages of python and the rpy2-package for
python (calls R commands withing python).

I want to make my python script installable
(so the package includes alreade the help-html
and the makefile). So it can be compiled with
the GRASS source (like any other add-on or script
(old question: is it a script or an addon? ;))

Now my questions: This script/addon needs a supplementary
file (a *.csv) which includes data for a R-regression (called
via rpy2). 
How do I have to include that additional text file in my package so that is also installed with the script/addon?
Where is the best place where it should go? Into a subfolder
within the addon or scriptfolder? What is then the path to that file in my python script? Is there anything like a relativ path (like: "look for the file
in a subfolder of the directory where the script/addon is stored")?
Maybe there is already a python module or addon which also needs
addtional files? How is it solved there?

Thank you very much
NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!		
Jetzt informieren: http://www.gmx.net/de/go/freephone

More information about the grass-user mailing list