updated wiki generator
This commit is contained in:
parent
c0943dd033
commit
d68a9d82de
@ -6,7 +6,7 @@ import sys
|
||||
|
||||
|
||||
def usage():
|
||||
print "python pytowiki.py module_name output_file"
|
||||
print("python pytowiki.py module_name output_file")
|
||||
|
||||
|
||||
class CodeplexFormatter:
|
||||
@ -99,7 +99,7 @@ def buildDoc( ioStream, formatter, apiInfo ):
|
||||
for func in apiInfo.funcs:
|
||||
ioStream.write( formatter.bulletItem( formatter.link( func.__name__, func.__name__ ) ) )
|
||||
|
||||
ioStream.write( formatter.endl() )
|
||||
ioStream.write( formatter.endl() )
|
||||
|
||||
ioStream.write( formatter.header2( "Classes" ) )
|
||||
|
||||
@ -134,7 +134,7 @@ def buildDoc( ioStream, formatter, apiInfo ):
|
||||
ioStream.write( formatter.bulletItem( formatter.link( p[0], cls.__name__ + "." + p[0]) ) )
|
||||
ioStream.write( formatter.endl() )
|
||||
|
||||
methods = filter( lambda m: m.__doc__ != None, cls.methods )
|
||||
methods = list(filter( lambda m: m.__doc__ != None, cls.methods ) )
|
||||
|
||||
if methods:
|
||||
ioStream.write( formatter.header4( "Methods:") )
|
||||
@ -174,7 +174,7 @@ def main():
|
||||
|
||||
module = __import__( moduleName )
|
||||
|
||||
with file( fileName, "w" ) as wikiIo:
|
||||
with open( fileName, "w" ) as wikiIo:
|
||||
|
||||
apiInfo = ModuleInfo( module )
|
||||
|
||||
@ -185,7 +185,7 @@ def main():
|
||||
|
||||
except ImportWarning:
|
||||
|
||||
print "failed to import module " + moduleName
|
||||
print("failed to import module ", moduleName)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
@ -388,8 +388,9 @@ class TypeInfoTest( unittest.TestCase ):
|
||||
self.assertFalse(ti.isConstField("m_staticConst"))
|
||||
|
||||
#def testClangCompile(self):
|
||||
# src = "#include <windows.h>\r\n";
|
||||
# opt = "-I\"C:/Program Files (x86)/Windows Kits/8.1/Include/um\" -I\"C:/Program Files (x86)/Windows Kits/8.1/Include/shared\" -w";
|
||||
# symEnum = pykd.getSymbolProviderFromSource(src, opt)
|
||||
# for sym, _, _ in symEnum:
|
||||
# print(sym)
|
||||
# src_code = '#include <windows.h>\r\n'
|
||||
# include_path = '"C:/Program Files (x86)/Windows Kits/8.1/Include/um";"C:/Program Files (x86)/Windows Kits/8.1/Include/shared'
|
||||
# compile_opts = '-I%s -w' % include_path
|
||||
# symbolEnum = pykd.getSymbolProviderFromSource(src_code, compile_opts)
|
||||
# for symName, _, symType in symbolEnum :
|
||||
# print( symName, symType.name() )
|
Loading…
Reference in New Issue
Block a user