def wsdl2py(args=None):
op = optparse.OptionParser(usage="<STR_LIT>",<EOL>description=wsdl2py.__doc__)<EOL>op.add_option("<STR_LIT>", "<STR_LIT>",<EOL>action="<STR_LIT:store_true>", dest="<STR_LIT>", default=False,<EOL>help="<STR_LIT>")<EOL>op.add_option("<STR_LIT>", "<STR_LIT>",<EOL>action="<STR_LIT>", callback=SetDebugCallback,<EOL>help="<STR_LIT>")<EOL>op.add_option("<STR_LIT>", "<STR_LIT>",<EOL>action="<STR_LIT:store_true>", dest="<STR_LIT:address>", default=False,<EOL>help="<STR_LIT>")<EOL>op.add_option("<STR_LIT>", "<STR_LIT>",<EOL>action="<STR_LIT>", callback=SetPyclassMetaclass, <EOL>callback_kwargs={'<STR_LIT>':'<STR_LIT>', <EOL>'<STR_LIT>':'<STR_LIT>'},<EOL>help="<STR_LIT>")<EOL>op.add_option("<STR_LIT>", "<STR_LIT>",<EOL>action="<STR_LIT>", callback=SetUpLazyEvaluation, <EOL>callback_kwargs={},<EOL>help="<STR_LIT>")<EOL>op.add_option("<STR_LIT>", "<STR_LIT>",<EOL>action="<STR_LIT:store_true>", dest='<STR_LIT>', default=False,<EOL>help="<STR_LIT>")<EOL>op.add_option("<STR_LIT>", "<STR_LIT>",<EOL>action="<STR_LIT:store>", dest="<STR_LIT>", default="<STR_LIT:.>", type="<STR_LIT:string>",<EOL>help="<STR_LIT>")<EOL>op.add_option("<STR_LIT>", "<STR_LIT>",<EOL>action="<STR_LIT:store_true>", dest="<STR_LIT>", default=False,<EOL>help="<STR_LIT>")<EOL>op.add_option("<STR_LIT>", "<STR_LIT>",<EOL>action="<STR_LIT:store_true>", dest="<STR_LIT>", default=False,<EOL>help="<STR_LIT>")<EOL>is_cmdline = args is None<EOL>if is_cmdline:<EOL><INDENT>(options, args) = op.parse_args()<EOL><DEDENT>else:<EOL><INDENT>(options, args) = op.parse_args(args)<EOL><DEDENT>if len(args) != <NUM_LIT:1>:<EOL><INDENT>print('<STR_LIT>', file=sys.stderr)<EOL>sys.exit(os.EX_USAGE)<EOL><DEDENT>location = args[<NUM_LIT:0>]<EOL>if options.schema is True:<EOL><INDENT>reader = XMLSchema.SchemaReader(base_url=location)<EOL><DEDENT>else:<EOL><INDENT>reader = WSDLTools.WSDLReader()<EOL><DEDENT>load = reader.loadFromFile<EOL>if not isfile(location):<EOL><INDENT>load = reader.loadFromURL<EOL><DEDENT>try:<EOL><INDENT>wsdl = load(location)<EOL><DEDENT>except Exception as e:<EOL><INDENT>print("<STR_LIT>" % (location, e), file=sys.stderr)<EOL>traceback.print_exc(sys.stderr)<EOL>if hasattr(os, '<STR_LIT>'): sys.exit(os.EX_NOINPUT)<EOL>sys.exit("<STR_LIT>" %location)<EOL><DEDENT>if isinstance(wsdl, XMLSchema.XMLSchema): <EOL><INDENT>wsdl.location = location<EOL>files = _wsdl2py(options, wsdl)<EOL><DEDENT>else:<EOL><INDENT>files = _wsdl2py(options, wsdl)<EOL>files.append(_wsdl2dispatch(options, wsdl))<EOL><DEDENT>if getattr(options, '<STR_LIT>', False):<EOL><INDENT>_writepydoc(os.path.join('<STR_LIT>', '<STR_LIT>'), *files)<EOL><DEDENT>if is_cmdline:<EOL><INDENT>return<EOL><DEDENT>return files<EOL>
Utility for automatically generating client/service interface code from
    a wsdl definition, and a set of classes representing element declarations 
    and type definitions.  By default invoking this script produces three files, 
    each named after the wsdl definition name, in the current working directory.

    Generated Modules Suffix:
        _client.py -- client locator, rpc proxy port, messages
        _types.py  -- typecodes representing 
        _server.py -- server-side bindings

    Parameters:
        args -- optional can provide arguments, rather than parsing 
            command-line.

    return:
        Default behavior is to return None, if args are provided then
        return names of the generated files.