Re: Module Config Sections

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2011-03-08 at 15:32 +0000, Nick Nachefski wrote:
> How can I get a func module to parse config items from a section other
> than â[main]â?

Without checking what func uses to store/retrieve configuration
settings, this is what i always use:


from configobj import ConfigObj
config = ConfigObj('your_config_file')
section = config['other']
other_var = section['other_var']
print "The value is %s" % other_var

HTH

regards,

LÃon


_______________________________________________
Func-list mailing list
Func-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/func-list



[Index of Archives]     [Fedora Users]     [Linux Networking]     [Fedora Legacy List]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux