| Trees | Index | Help |
|---|
| Package Peapod :: Module peapod :: Class peapodConf |
|
Class to manage the configuration for peapod. Handles command-line
arguments, configuration file options and hardcoded defaults. Options may
be global or specific to a known feed.
The configuration file is stored as an xml file. If one is not present, a
default can be created.
Use :
config = getConfig()
print config.options["savepath"]
for feed in config.feedlist:
print feed[""]
print feed["url"]
print feed["options"]["savepath"]
| Method Summary | |
|---|---|
__init__(self,
cmd_line)
| |
Creates a default configuration file, usually in ~/.peapod/peapod.xml, which provides a sample podcast subscription. | |
Extract text from the xml tags read in. | |
Read configuration file and use contents to override default options. | |
Extract value from an option element. | |
| Class Variable Summary | |
|---|---|
dict |
defaults = {'verbose': 0, 'ipodpath': '/media/ipod', 'te...
|
NoneType |
_instance = None |
| Method Details |
|---|
create_default_config(self)Creates a default configuration file, usually in ~/.peapod/peapod.xml, which provides a sample podcast subscription. |
get_text(self, nodelist)Extract text from the xml tags read in. Data type is not known at this point. |
parse_configfile(self)Read configuration file and use contents to override default options. |
process_options(self, element, opt)Extract value from an option element. Data type is assumed from the string content. Extracted values are inserted into opt as dictionary elements. |
| Class Variable Details |
|---|
defaults
|
_instance
|
| Trees | Index | Help |
|---|
| Generated by Epydoc 2.1 on Sun Feb 13 06:25:12 2011 | http://epydoc.sf.net |