def main(prog, *args):

    # import rpdb2
    # rpdb2.start_embedded_debugger("bala")
    listen = 'localhost'
    port = py9p.PORT
    mods = []
    noauth = 0
    dbg = False
    user = None
    dom = None
    passwd = None
    authmode = None
    key = None
    dotu = 0

    try:
        opt,args = getopt.getopt(args, "dDp:l:a:")
    except Exception, msg:
        usage(prog)
    for opt,optarg in opt:
        if opt == '-d':
            dotu = optarg
        if opt == "-D":
            dbg = True
        if opt == "-p":
            port = int(optarg)
        if opt == '-l':
            listen = optarg
        if opt == '-a':
            authmode = optarg

    if authmode == 'sk1':
        if len(args) != 2:
            print >>sys.stderr, 'missing user and authsrv'
            usage(prog)
        else:
            py9p.sk1 = __import__("py9p.sk1").sk1
            user = args[0]
            dom = args[1]
            passwd = getpass.getpass()
            key = py9p.sk1.makeKey(passwd)
    elif authmode == 'pki':
        py9p.pki = __import__("py9p.pki").pki
        user = 'admin'
    elif authmode != None and authmode != 'none':
        print >>sys.stderr, "unknown auth type: %s; accepted: pki or sk1"/authmode
        sys.exit(1)

    srv = py9p.Server(listen=(listen, port), authmode=authmode, user=user, dom=dom, key=key, chatty=dbg)
    srv.mount(SampleFs())
    srv.serve()
dataset/ETHPy150Open svinota/py9p/examples/composite.py/main/operator `%` -> `/`