Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
f443df05
Commit
f443df05
authored
Apr 20, 2002
by
Tim Peters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
do_project(): Modernized the code.
parent
da2b74f7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
Doc/tools/prechm.py
Doc/tools/prechm.py
+10
-9
No files found.
Doc/tools/prechm.py
View file @
f443df05
...
...
@@ -301,14 +301,17 @@ def do_content(library, version, output) :
content
(
book
[
0
],
book
[
3
],
output
)
output
.
write
(
contents_footer
)
def
do_project
(
library
,
output
,
arch
,
version
)
:
# Fill in the [FILES] section of the project (.hhp) file.
# 'library' is the list of directory description tuples from
# supported_libraries for the version of the docs getting generated.
def
do_project
(
library
,
output
,
arch
,
version
):
output
.
write
(
project_template
%
locals
())
for
book
in
library
:
for
page
in
os
.
listdir
(
book
[
0
])
:
if
page
[
string
.
rfind
(
page
,
'.'
):]
==
'.html'
or
\
page
[
string
.
rfind
(
page
,
'.'
):]
==
'.css'
:
output
.
write
(
book
[
0
]
+
'
\
\
'
+
page
+
'
\
n
'
)
for
book
in
library
:
directory
=
book
[
0
]
path
=
directory
+
'
\
\
%s
\
n
'
for
page
in
os
.
listdir
(
directory
):
if
page
.
endswith
(
'.html'
)
or
page
.
endswith
(
'.css'
):
output
.
write
(
path
%
page
)
def
openfile
(
file
)
:
...
...
@@ -385,5 +388,3 @@ def do_it(args = None) :
if
__name__
==
'__main__'
:
do_it
()
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