Vega strike Python Modules doc
0.5.1
Documentation of the " Modules " folder of Vega strike
|
Public Member Functions | |
def | __init__ |
def | defaults |
def | sections |
def | add_section |
def | has_section |
def | options |
def | read |
def | readfp |
def | get |
def | getint |
def | getfloat |
def | getboolean |
def | optionxform |
def | has_option |
def | set |
def | write |
def | remove_option |
def | remove_section |
Static Public Attributes | |
tuple | SECTCRE |
tuple | OPTCRE |
Definition at line 172 of file ConfigParser.py.
def __init__ | ( | self, | |
defaults = None |
|||
) |
Definition at line 173 of file ConfigParser.py.
References ConfigParser.__defaults, and ConfigParser.__sections.
def add_section | ( | self, | |
section | |||
) |
Create a new section in the configuration. Raise DuplicateSectionError if a section by the specified name already exists.
Definition at line 188 of file ConfigParser.py.
References ConfigParser.__sections.
def defaults | ( | self) |
Definition at line 180 of file ConfigParser.py.
References ConfigParser.__defaults.
def get | ( | self, | |
section, | |||
option, | |||
raw = 0 , |
|||
vars = None |
|||
) |
Get an option value for a given section. All % interpolations are expanded in the return values, based on the defaults passed into the constructor, unless the optional argument `raw' is true. Additional substitutions may be provided using the `vars' argument, which must be a dictionary whose contents overrides any pre-existing defaults. The section DEFAULT is special.
Definition at line 252 of file ConfigParser.py.
References ConfigParser.__sections, ConfigParser.get(), Message.get, and ConfigParser.optionxform().
def getboolean | ( | self, | |
section, | |||
option | |||
) |
def getfloat | ( | self, | |
section, | |||
option | |||
) |
Definition at line 306 of file ConfigParser.py.
References ConfigParser.__get().
def getint | ( | self, | |
section, | |||
option | |||
) |
Definition at line 303 of file ConfigParser.py.
References ConfigParser.__get().
def has_option | ( | self, | |
section, | |||
option | |||
) |
Check for the existence of a given option in a given section.
Definition at line 320 of file ConfigParser.py.
References ConfigParser.__sections, dumbdbm.has_key(), ConfigParser.has_section(), and ConfigParser.optionxform().
def has_section | ( | self, | |
section | |||
) |
Indicate whether the named section is present in the configuration. The DEFAULT section is not acknowledged.
Definition at line 198 of file ConfigParser.py.
References ConfigParser.sections().
def options | ( | self, | |
section | |||
) |
Return a list of option names for the given section name.
Definition at line 205 of file ConfigParser.py.
References ConfigParser.__defaults, and ConfigParser.__sections.
def optionxform | ( | self, | |
optionstr | |||
) |
Definition at line 317 of file ConfigParser.py.
def read | ( | self, | |
filenames | |||
) |
Read and parse a filename or a list of filenames. Files that cannot be opened are silently ignored; this is designed so that you can specify a list of potential configuration file locations (e.g. current directory, user's home directory, systemwide directory), and all existing configuration files in the list will be read. A single filename may also be given.
Definition at line 216 of file ConfigParser.py.
References ConfigParser.__read(), and aifc.open().
def readfp | ( | self, | |
fp, | |||
filename = None |
|||
) |
Like read() but the argument must be a file-like object. The `fp' argument must have a `readline' method. Optional second argument is the `filename', which if not given, is taken from fp.name. If fp has no `name' attribute, `<???>' is used.
Definition at line 236 of file ConfigParser.py.
References ConfigParser.__read().
def remove_option | ( | self, | |
section, | |||
option | |||
) |
Remove an option.
Definition at line 358 of file ConfigParser.py.
References ConfigParser.__defaults, ConfigParser.__sections, and ConfigParser.optionxform().
def remove_section | ( | self, | |
section | |||
) |
Remove a file section.
Definition at line 373 of file ConfigParser.py.
References ConfigParser.__sections.
def sections | ( | self) |
Return a list of section names, excluding [DEFAULT]
Definition at line 183 of file ConfigParser.py.
def set | ( | self, | |
section, | |||
option, | |||
value | |||
) |
Set an option.
Definition at line 330 of file ConfigParser.py.
References ConfigParser.__defaults, ConfigParser.__sections, and ConfigParser.optionxform().
def write | ( | self, | |
fp | |||
) |
Write an .ini-format representation of the configuration state.
Definition at line 342 of file ConfigParser.py.
References ConfigParser.__defaults, ConfigParser.__sections, pydoc.replace(), ConfigParser.sections(), and locale.str().
|
static |
Definition at line 390 of file ConfigParser.py.
|
static |
Definition at line 385 of file ConfigParser.py.