cantera/doc/python/mkmkdoc.py
Ray Speth 6cb4bd93ce Cleaned up whitespace in all Python files using reindent.py
4 spaces per indentation level, no tabs, no trailing whitespace,
and a single newline at end of each file.
2012-02-27 18:13:05 +00:00

24 lines
537 B
Python

import os
def writepydoc(pkg, out):
nm = pkg.__name__
out.write('pydoc -w '+nm+'\n')
p = pkg.__path__[0]
files = os.listdir(p)
for f in files:
n = f.split('.')
if len(n) >= 2 and n[-1] == 'py' and n[0][0] <> '_':
try:
exec('import '+nm+'.'+n[0])
out.write('pydoc -w '+nm+'.'+n[0]+'\n')
except:
pass
out = open('mkdoc','w')
import Cantera
writepydoc(Cantera, out)
import Cantera.OneD
writepydoc(Cantera.OneD, out)
out.close()