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
0e64e32d
Commit
0e64e32d
authored
Sep 15, 2010
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
monkey: follow pep8
parent
a1458850
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
gevent/monkey.py
gevent/monkey.py
+4
-4
No files found.
gevent/monkey.py
View file @
0e64e32d
...
...
@@ -107,7 +107,7 @@ def patch_thread(threading=True, _threading_local=True):
def
patch_socket
(
dns
=
True
,
aggressive
=
True
):
"""Replace the standard socket object with gevent's cooperative sockets.
If *dns* is true, also patch dns functions in :mod:`socket`.
"""
from
gevent
import
socket
...
...
@@ -188,7 +188,7 @@ def patch_all(socket=True, dns=True, time=True, select=True, thread=True, os=Tru
if
__name__
==
'__main__'
:
modules
=
[
x
.
replace
(
'patch_'
,
''
)
for
x
in
globals
().
keys
()
if
x
.
startswith
(
'patch_'
)
and
x
!=
'patch_all'
]
modules
=
[
x
.
replace
(
'patch_'
,
''
)
for
x
in
globals
().
keys
()
if
x
.
startswith
(
'patch_'
)
and
x
!=
'patch_all'
]
script_help
=
"""gevent.monkey - monkey patch the standard modules to use gevent.
USAGE: python -m gevent.monkey [MONKEY OPTIONS] script [SCRIPT OPTIONS]
...
...
@@ -215,7 +215,8 @@ MONKEY OPTIONS: --verbose %s""" % ', '.join('--[no-]%s' % m for m in modules)
del
argv
[
0
]
# TODO: break on --
if
verbose
:
import
pprint
,
os
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
)
...
...
@@ -229,4 +230,3 @@ MONKEY OPTIONS: --verbose %s""" % ', '.join('--[no-]%s' % m for m in modules)
execfile
(
sys
.
argv
[
0
])
else
:
print
script_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