'Realize a configuration.
Optional arguments:
args     -- the command line arguments, less the program name
(default is sys.argv[1:])
doc      -- usage message (default is __main__.__doc__)'

def realize(self, args=None, doc=None, progname=None):

    if (args is None):
        args = sys.argv[1:]
    if (progname is None):
        progname = sys.argv[0]
    if (doc is None):
        try:
            import __main__
            doc = __main__.__doc__
        except Exception:
            pass
    self.progname = progname
    self.doc = doc
    self.options = []
    self.args = []
    try:
        (self.options, self.args) = getopt.getopt(args, ''.join(self.short_options), self.long_options)
    except getopt.error as exc:
        self.usage(str(exc))
    if (self.args and (not self.positional_args_allowed)):
        self.usage(('positional    arguments    are    not    supported:    %s' % str(self.args)))
    for (opt, arg) in self.options:
        (name, handler) = self.options_map[opt]
        if (handler is not None):
            try:
                arg = handler(arg)
            except ValueError as msg:
                self.usage(('invalid    value    for    %s    %r:    %s' % (opt, arg, msg)))
        if (name and (arg is not None)):
            if (getattr(self, name) is not None):
                self.usage(('conflicting    command    line    option    %r' % opt))
            self._set(name, arg, 2)
    for envvar in self.environ_map.keys():
        (name, handler) = self.environ_map[envvar]
        if (envvar in os.environ):
            value = os.environ[envvar]
            if (handler is not None):
                try:
                    value = handler(value)
                except ValueError as msg:
                    self.usage(('invalid    environment    value    for    %s    %r:    %s' % (envvar, value, msg)))
            if (name and (value is not None)):
                self._set(name, value, 1)
    if (self.configfile is None):
        uid = os.getuid()
        if ((uid == 0) and ('supervisord' in self.progname)):
            self.warnings.warn('Supervisord    is    running    as    root    and    it    is    searching    for    its    configuration    file    in    default    locations    (including    its    current    working    directory);    you    probably    want    to    specify    a    "-c"    argument    specifying    an    absolute    path    to    a    configuration    file    for    improved    security.')
        self.configfile = self.default_configfile()
    self.process_config()
