def run(port, routes, sslport=None, dnsport=53, tld='dev', ip='127.0.0.1', verbose=False):

    req_callback, ssl_callback = make_callbacks(routes)

    dnsc = devdns.connect(port=dnsport)
    print 'devDNS :: *.%s. 60 IN A %s' % (tld, ip)

    mainloop = ioloop.IOLoop.instance()
    periodic = ioloop.PeriodicCallback(lambda : devdns.get_data(dnsc, tld, ip, verbose), 
                                       50.0, 
                                       io_loop=mainloop)
    periodic.start()

    all_methods = ['GET', 'POST', 'OPTIONS', 'PUT', 'DELETE', 'HEAD']
    quickproxy.run_proxy(port=port,
                         methods=all_methods, 
                         req_callback=req_callback,
                         debug_level=1 if verbose else 0,
                         start_ioloop=False)

    if sslport:
        # for ssl testing, run a second instance of the proxy on the ssl port
        quickproxy.run_proxy(port=sslport,
                             test_ssl=True,
                             methods=all_methods, 
                             req_callback=ssl_callback,
                             debug_level=1 if verbose else 0,
                             start_ioloop=False)

    try:
        print (port % "Starting HTTP proxy on port %d")
        mainloop.start()
    except KeyboardInterrupt:
        dnsc.close()
dataset/ETHPy150Open braceio/localdev/localdev/server.py/run/swapped operands of `%`