|
10 | 10 |
|
11 | 11 | for modname in sys.builtin_module_names: |
12 | 12 | modules[modname] = modname |
13 | | - |
| 13 | + |
14 | 14 | for dir in sys.path: |
15 | 15 | # Look for *.py files |
16 | 16 | filelist = glob.glob(os.path.join(dir, '*.py')) |
17 | | - for file in filelist: |
| 17 | + for file in filelist: |
18 | 18 | path, file = os.path.split(file) |
19 | 19 | base, ext = os.path.splitext(file) |
20 | 20 | modules[base.lower()] = base |
21 | 21 |
|
22 | 22 | # Look for shared library files |
23 | | - filelist = (glob.glob(os.path.join(dir, '*.so')) + |
| 23 | + filelist = (glob.glob(os.path.join(dir, '*.so')) + |
24 | 24 | glob.glob(os.path.join(dir, '*.sl')) + |
25 | 25 | glob.glob(os.path.join(dir, '*.o')) ) |
26 | | - for file in filelist: |
| 26 | + for file in filelist: |
27 | 27 | path, file = os.path.split(file) |
28 | 28 | base, ext = os.path.splitext(file) |
29 | 29 | if base[-6:] == 'module': |
|
54 | 54 | # Phase III: write custlib.tex |
55 | 55 |
|
56 | 56 | # Write the boilerplate |
57 | | -# XXX should be fancied up. |
| 57 | +# XXX should be fancied up. |
58 | 58 | print """\documentstyle[twoside,11pt,myformat]{report} |
59 | 59 | \\title{Python Library Reference} |
60 | 60 | \\input{boilerplate} |
|
69 | 69 | \\pagebreak |
70 | 70 | {\\parskip = 0mm \\tableofcontents} |
71 | 71 | \\pagebreak\\pagenumbering{arabic}""" |
72 | | - |
73 | | -for modname in mlist: |
| 72 | + |
| 73 | +for modname in mlist: |
74 | 74 | print "\\input{lib%s}" % (modname,) |
75 | | - |
| 75 | + |
76 | 76 | # Write the end |
77 | 77 | print """\\input{custlib.ind} % Index |
78 | 78 | \\end{document}""" |
0 commit comments