comparison requestdumpster/dumpster.py @ 6:aa19f80caa63

more stubbing
author Jeff Hammel <k0scist@gmail.com>
date Wed, 01 Jul 2015 08:42:12 -0700
parents afa7a874d28e
children 83c51f45b82d
comparison
equal deleted inserted replaced
5:afa7a874d28e 6:aa19f80caa63
37 parser.add_option('-d', '--directory', dest='directory', 37 parser.add_option('-d', '--directory', dest='directory',
38 help="directory to output requests to") 38 help="directory to output requests to")
39 options = parser.parse_args() 39 options = parser.parse_args()
40 40
41 # instantiate WSGI app 41 # instantiate WSGI app
42 app = 42 app = RequestDumpster(directory=options.directory)
43 43
44 # construct url 44 # construct url
45 url = 'http://localhost:{port}/'.format(port=options.port) 45 url = 'http://localhost:{port}/'.format(port=options.port)
46 46
47 # serve some web
48 server = simple_server.make_server(host=host, port=int(port), app=app)
49 server.serve_forever()
50
47 if __name__ == '__main__': 51 if __name__ == '__main__':
48 main() 52 main()