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
e577f1a0
Commit
e577f1a0
authored
Aug 26, 2010
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
doc/generate_rst.py: better progress reporting
parent
2d9211a1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
doc/generate_rst.py
doc/generate_rst.py
+4
-2
No files found.
doc/generate_rst.py
View file @
e577f1a0
...
...
@@ -21,6 +21,7 @@ template = '''.. AUTOGENERATED -- will be overwritten (remove this comment to sa
'''
directory
=
dirname
(
abspath
(
gevent
.
__file__
))
print
'Imported gevent from %s'
%
(
directory
,
)
modules
=
glob
.
glob
(
join
(
directory
,
'*.py'
))
+
glob
.
glob
(
join
(
directory
,
'*.pyc'
))
modules
=
set
(
basename
(
filename
).
split
(
'.'
)[
0
]
for
filename
in
modules
)
modules
=
set
(
name
for
name
in
modules
if
not
name
.
startswith
(
'_'
))
...
...
@@ -54,10 +55,10 @@ def generate_rst_for_module(module, do=True):
if
open
(
rst_filename
).
read
(
len
(
result
)
+
1
)
==
result
:
return
# already exists one which is the same
if
do
:
print
'Generated %s
'
%
rst_filename
print
'Generated %s
from %s'
%
(
rst_filename
,
m
.
__file__
)
open
(
rst_filename
,
'w'
).
write
(
result
)
else
:
print
'Would generate %s
'
%
rst_filename
print
'Would generate %s
from %s'
%
(
rst_filename
,
m
.
__file__
)
def
generate_rst
(
do
=
True
):
...
...
@@ -84,6 +85,7 @@ if __name__ == '__main__':
print
filename
elif
sys
.
argv
[
1
:]
==
[
'delete'
]:
for
filename
in
iter_autogenerated
():
print
'Removing'
,
filename
os
.
unlink
(
filename
)
elif
sys
.
argv
[
1
:]
==
[
'generate'
]:
generate_rst
()
...
...
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