[Tutor] where to put configuration files

Jeff Shannon jeff@ccvcorp.com
Tue Jun 10 13:42:04 2003


Paul Tremblay wrote:

>How can I make a universal rule to parse __file__ in order to get the
>location of data.txt? The actual data.txt can exist many levels up from
>the actual module.
>
>Or do I actually put the data.txt *in* foo to begin with? But if I do
>that, wont' the install utility try to see it as a python file?
>  
>

If you're using a module's __file__, then you'd probably want to put 
that config file directly in the foo directory (or a subdirectory of 
it), yes.  To be honest, I can't say for sure how that'll affect the 
installer (I do all my work in-house, mostly directly on a server, so I 
almost never have a need for distutils...) but I'd be surprised if 
something couldn't be arranged.  

Jeff Shannon
Technician/Programmer
Credit International