Lukasz Szybalski wrote:
>>> Should I maybe create folder inside of virtualenv called "etc" right
>>> next to "bin" or?
>>> What would be an easy way to reference it?  "from
>>> some_pythonpath....import  __file__" then connect the folders
>>> __file__+"etc"+config.xml?
>>>
>>> What would be a recommended way to do it? How would you do it?
>> Is your configuration deployment-specific, or some kind of internal
>> configuration?  If it's associated with the deployment, I would put it in
>> ENV/etc/myapp.xml, or ENV/etc/myapp/config.xml, i.e., not connected to your
>> myapp source code.
> 
> Its a deployment specific. It holds some defaults that user can change.
> How would I access ENV ?? from xyz import __file__ ?

Generally you'd pass in the location of the configuration file from some 
command-line that starts the script.  You could try 
os.path.join(os.path.dirname(__main__.__file__), 'etc', 'myapp', 
'config.xml') as well, if you want a default.  __main__.__file__ should 
be the location of the script.

-- 
Ian Bicking : [EMAIL PROTECTED] : http://blog.ianbicking.org

_______________________________________________
Paste-users mailing list
[email protected]
http://webwareforpython.org/cgi-bin/mailman/listinfo/paste-users

Reply via email to