you need to use a dynamic path

import os
path = os.path.join(request.folder, 'private', 'conf.ini')

then place the file in private folder and use the 'path' to read it.

Bruno Rocha
http://rochacbruno.com.br
mobile
 Em 16/10/2012 19:19, "deepak" <[email protected]> escreveu:

> Hi,
> I have a configuration file. I wanted to use ConfigObj library to access
> the configuration file.
> I have placed the file inside the controller and tried accessing it like:
>
> cfg=ConfigObj("conf.ini")
>
> It didnt read the file. But when i gave it like this:
>
> cfg=ConfObj("/home/deepak/web2py/applications/depyweb/controller/conf.ini")
>
> it worked!..
>
> What is the issue with this?
>
> --
>
>
>
>

-- 



Reply via email to