def from_configfile(self, configfile):
cfg = ConfigParser()<EOL>if hasattr(configfile, '<STR_LIT>'):<EOL><INDENT>cfg.read_file(configfile)<EOL><DEDENT>else:<EOL><INDENT>filesread = cfg.read(configfile)<EOL>if not filesread:<EOL><INDENT>raise ValueError('<STR_LIT>' % configfile)<EOL><DEDENT><DEDENT>if not cfg.has_section('<STR_LIT>'):<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>self.store = dict(cfg.items('<STR_LIT>'))<EOL>
Initialize the authentication store from a "config"-style file.

Auth "config" file is parsed with C{ConfigParser.RawConfigParser} and must contain
an [auth] section which contains the usernames (keys) and passwords (values).

Example auth file::

    [auth]
    someuser = somepass
    anotheruser = anotherpass

@param configfile: Path to config file or file-like object.
@type configfile: C{any}
@raise ValueError: If file could not be read or does not contain [auth] section.