def writeHypertext():
 shellCommand = 'pydoc -w ./'
 commandResult = os.system(shellCommand)
 if (commandResult != 0):
  print 'Failed to execute the following command in writeHypertext in docwrap.'
  print shellCommand
 hypertextFiles = archive.getFilesWithFileTypeWithoutWords('html')
 if (len(hypertextFiles) <= 0):
  print 'Failed to find any help files in writeHypertext in docwrap.'
  return
 documentDirectoryPath = archive.getAbsoluteFolderPath(hypertextFiles[0], 'documentation')
 removeFilesInDirectory(documentDirectoryPath)
 sortedReplaceFiles = []
 for hypertextFile in hypertextFiles:
  sortedReplaceFiles.append(hypertextFile.replace('.html', '. html'))
 sortedReplaceFiles.sort()
 hypertextFiles = []
 for sortedReplaceFile in sortedReplaceFiles:
  hypertextFiles.append(sortedReplaceFile.replace('. html', '.html'))
 transferredFileNames = []
 for hypertextFileIndex in xrange(len(hypertextFiles)):
  readWriteDeleteHypertextHelp(documentDirectoryPath, hypertextFileIndex, hypertextFiles, transferredFileNames)
 for transferredFileNameIndex in xrange(len(transferredFileNames)):
  readWriteNavigationHelp(documentDirectoryPath, transferredFileNameIndex, transferredFileNames)
 writeContentsFile(documentDirectoryPath, transferredFileNames)
 print ('%s files were wrapped.' % len(transferredFileNames))

def writeHypertext ( ) : shellCommand = 'pydoc -w ./' commandResult = os . system ( shellCommand ) if ( commandResult != 0 ) : print 'Failed to execute the following command in writeHypertext in docwrap.' print shellCommand hypertextFiles = archive . getFilesWithFileTypeWithoutWords ( 'html' ) if ( len ( hypertextFiles ) <= 0 ) : print 'Failed to find any help files in writeHypertext in docwrap.' return documentDirectoryPath = archive . getAbsoluteFolderPath ( hypertextFiles [ 0 ] , 'documentation' ) removeFilesInDirectory ( documentDirectoryPath ) sortedReplaceFiles = [ ] for hypertextFile in hypertextFiles : sortedReplaceFiles . append ( hypertextFile . replace ( '.html' , '. html' ) ) sortedReplaceFiles . sort ( ) hypertextFiles = [ ] for sortedReplaceFile in sortedReplaceFiles : hypertextFiles . append ( sortedReplaceFile . replace ( '. html' , '.html' ) ) transferredFileNames = [ ] for hypertextFileIndex in xrange ( len ( hypertextFiles ) ) : readWriteDeleteHypertextHelp ( documentDirectoryPath , hypertextFileIndex , hypertextFiles , transferredFileNames ) for transferredFileNameIndex in xrange ( len ( transferredFileNames ) ) : readWriteNavigationHelp ( documentDirectoryPath , transferredFileNameIndex , transferredFileNames ) writeContentsFile ( documentDirectoryPath , transferredFileNames ) print ( '%s files were wrapped.' % len ( transferredFileNames ) )
run pydoc .