Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gevent
Commits
70a5c1dc
Commit
70a5c1dc
authored
Oct 08, 2009
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix examples in regard to wsgi2->wsgi name change
parent
5d8fb9ea
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
examples/webchat/run.py
examples/webchat/run.py
+2
-2
examples/webproxy.py
examples/webproxy.py
+2
-2
examples/wsgiserver.py
examples/wsgiserver.py
+2
-2
No files found.
examples/webchat/run.py
View file @
70a5c1dc
#!/usr/bin/python
from
gevent
import
monkey
;
monkey
.
patch_all
()
from
gevent
import
wsgi2
from
gevent
.wsgi
import
WSGIServer
import
os
import
traceback
from
django.core.handlers.wsgi
import
WSGIHandler
...
...
@@ -16,5 +16,5 @@ got_request_exception.connect(exception_printer)
call_command
(
'syncdb'
)
print
'Serving on 8088...'
wsgi2
.
WSGIServer
((
''
,
8088
),
WSGIHandler
()).
serve_forever
()
WSGIServer
((
''
,
8088
),
WSGIHandler
()).
serve_forever
()
examples/webproxy.py
View file @
70a5c1dc
#!/usr/bin/python
from
gevent
import
monkey
;
monkey
.
patch_all
()
from
gevent
import
wsgi
2
from
gevent
import
wsgi
import
sys
import
re
import
traceback
...
...
@@ -109,5 +109,5 @@ if __name__ == '__main__':
#import doctest
#doctest.testmod()
print
'Serving on 8088...'
wsgi
2
.
WSGIServer
((
''
,
8088
),
application
).
serve_forever
()
wsgi
.
WSGIServer
((
''
,
8088
),
application
).
serve_forever
()
examples/wsgiserver.py
View file @
70a5c1dc
#!/usr/bin/python
"""WSGI server example"""
from
gevent
import
wsgi
2
from
gevent
import
wsgi
def
hello_world
(
env
,
start_response
):
if
env
[
'PATH_INFO'
]
==
'/'
:
...
...
@@ -12,5 +12,5 @@ def hello_world(env, start_response):
return
[
'Not Found
\
r
\
n
'
]
print
'Serving on 8088...'
wsgi
2
.
WSGIServer
((
''
,
8088
),
hello_world
).
serve_forever
()
wsgi
.
WSGIServer
((
''
,
8088
),
hello_world
).
serve_forever
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment