-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathmultiplexer.py
More file actions
executable file
·31 lines (26 loc) · 1.12 KB
/
multiplexer.py
File metadata and controls
executable file
·31 lines (26 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env python
# This file is part of the Adblock Plus web scripts,
# Copyright (C) 2006-present eyeo GmbH
#
# Adblock Plus is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Foundation.
#
# Adblock Plus is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
from sitescripts.web import multiplex
try:
from werkzeug.serving import run_simple
except ImportError:
from wsgiref.simple_server import make_server
def run_simple(host, port, app, **kwargs):
server = make_server(host, port, app)
print ' * Running on http://%s:%i/' % server.server_address
server.serve_forever()
if __name__ == '__main__':
run_simple('localhost', 5000, multiplex, use_reloader=True, use_debugger=True)