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
500e0a8c
Commit
500e0a8c
authored
May 30, 2011
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use "print (xxx)" instead of print xxx for compatibility with py3k. Patch by Damien Churchill.
parent
1f9a1f06
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
11 deletions
+11
-11
gevent/backdoor.py
gevent/backdoor.py
+1
-1
gevent/httplib.py
gevent/httplib.py
+3
-3
gevent/monkey.py
gevent/monkey.py
+6
-6
gevent/wsgi.py
gevent/wsgi.py
+1
-1
No files found.
gevent/backdoor.py
View file @
500e0a8c
...
...
@@ -100,6 +100,6 @@ class _fileobject(socket._fileobject):
if
__name__
==
'__main__'
:
if
not
sys
.
argv
[
1
:]:
print
'USAGE: %s PORT'
%
sys
.
argv
[
0
]
print
(
'USAGE: %s PORT'
%
sys
.
argv
[
0
])
else
:
BackdoorServer
((
'127.0.0.1'
,
int
(
sys
.
argv
[
1
]))).
serve_forever
()
gevent/httplib.py
View file @
500e0a8c
...
...
@@ -105,7 +105,7 @@ class HTTPResponse(object):
if
self
.
debuglevel
>
0
:
for
(
k
,
v
)
in
self
.
getheaders
():
print
'header:'
,
k
,
v
print
(
'header: %s %s'
%
(
k
,
v
))
def
read
(
self
,
amt
=-
1
):
return
self
.
_request
.
input_buffer
.
read
(
amt
)
...
...
@@ -199,7 +199,7 @@ class HTTPConnection(object):
if
self
.
conn
:
return
if
self
.
debuglevel
>
0
:
print
'connect: (%s, %u)'
%
(
self
.
host
,
self
.
port
)
print
(
'connect: (%s, %u)'
%
(
self
.
host
,
self
.
port
)
)
self
.
conn
=
core
.
http_connection
.
new
(
self
.
host
,
self
.
port
,
get_hub
().
reactor
)
...
...
@@ -234,6 +234,6 @@ class HTTPConnection(object):
def
send
(
self
,
data
):
if
self
.
debuglevel
>
0
:
print
'send:'
,
repr
(
data
)
print
(
'send: %r'
%
data
)
self
.
req
.
output_buffer
.
write
(
data
)
gevent/monkey.py
View file @
500e0a8c
...
...
@@ -230,11 +230,11 @@ MONKEY OPTIONS: --verbose %s""" % ', '.join('--[no-]%s' % m for m in modules)
if
verbose
:
import
pprint
import
os
print
'gevent.monkey.patch_all(%s)'
%
', '
.
join
(
'%s=%s'
%
item
for
item
in
args
.
items
(
))
print
'sys.version=%s'
%
(
sys
.
version
.
strip
().
replace
(
'
\
n
'
,
' '
),
)
print
'sys.path=%s'
%
pprint
.
pformat
(
sys
.
path
)
print
'sys.modules=%s'
%
pprint
.
pformat
(
sorted
(
sys
.
modules
.
keys
(
)))
print
'cwd=%s'
%
os
.
getcwd
(
)
print
(
'gevent.monkey.patch_all(%s)'
%
', '
.
join
(
'%s=%s'
%
item
for
item
in
args
.
items
()
))
print
(
'sys.version=%s'
%
(
sys
.
version
.
strip
().
replace
(
'
\
n
'
,
' '
),
)
)
print
(
'sys.path=%s'
%
pprint
.
pformat
(
sys
.
path
)
)
print
(
'sys.modules=%s'
%
pprint
.
pformat
(
sorted
(
sys
.
modules
.
keys
()
)))
print
(
'cwd=%s'
%
os
.
getcwd
()
)
patch_all
(
**
args
)
if
argv
:
...
...
@@ -242,4 +242,4 @@ MONKEY OPTIONS: --verbose %s""" % ', '.join('--[no-]%s' % m for m in modules)
__package__
=
None
execfile
(
sys
.
argv
[
0
])
else
:
print
script_help
print
(
script_help
)
gevent/wsgi.py
View file @
500e0a8c
...
...
@@ -230,7 +230,7 @@ Where /path/to/myapp.wsgi is a Python script that defines "application" callable
except
AttributeError
:
sys
.
exit
(
"Could not find application in %s"
%
filename
)
server
=
WSGIServer
((
options
.
interface
,
options
.
port
),
application
,
spawn
=
options
.
spawn
)
print
'Serving %s on %s:%s'
%
(
filename
,
options
.
interface
,
options
.
port
)
print
(
'Serving %s on %s:%s'
%
(
filename
,
options
.
interface
,
options
.
port
)
)
server
.
serve_forever
()
else
:
sys
.
stderr
.
write
(
parser
.
format_help
())
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