Python 2.4.1 (#1, May 16 2005, 15:19:29) [GCC 4.0.0 20050512 (Red Hat 4.0.0-5)] on linux2 Type "copyright", "credits" or "license()" for more information. **************************************************************** Personal firewall software may warn about the connection IDLE makes to its subprocess using this computer's internal loopback interface. This connection is not visible on any external interface and no data is sent to or received from the Internet. **************************************************************** IDLE 1.1.1 >>> import os, sys >>> import chm.chm as cc >>> help(cc) Help on module chm.chm in chm: NAME chm.chm - chm - A high-level front end for the chmlib python module. FILE /usr/lib/python2.4/site-packages/chm/chm.py DESCRIPTION The chm module provides high level access to the functionality included in chmlib. It encapsulates functions in the CHMFile class, and provides some additional features, such as the ability to obtain the contents tree of a CHM archive. CLASSES CHMFile class CHMFile | A class to manage access to CHM files. | | Methods defined here: | | CloseCHM(self) | Closes the CHM archive. | This function will close the CHM file, if it is open. All variables | are also reset. | | GetArchiveInfo(self) | Obtains information on CHM archive. | This function checks the /#SYSTEM file inside the CHM archive to | obtain the index, home page, topics, encoding and title. It is called | from LoadCHM. | | GetEncoding(self) | Returns a string that can be used with the codecs python package | to encode or decode the files in the chm archive. If an error is | found, or if it is not possible to find the encoding, None is | returned. | | GetIndex(self) | Reads and returns the index tree. | This auxiliary function reads and returns the index tree file | contents for the CHM archive. | | GetLCID(self) | Returns the archive Locale ID | | GetTopicsTree(self) | Reads and returns the topics tree. | This auxiliary function reads and returns the topics tree file | contents for the CHM archive. | | IsSearchable(self) | Indicates if the full-text search is available for this | archive - this flag is updated when GetArchiveInfo is called | | LoadCHM(self, archiveName) | Loads a CHM archive. | This function will also call GetArchiveInfo to obtain information | such as the index file name and the topics file. It returns 1 on | success, and 0 if it fails. | | ResolveObject(self, document) | Tries to locate a document in the archive. | This function tries to locate the document inside the archive. It | returns a tuple where the first element is zero if the function | was successful, and the second is the UnitInfo for that document. | The UnitInfo is used to retrieve the document contents | | RetrieveObject(self, ui, start=-1, length=-1) | Retrieves the contents of a document. | This function takes a UnitInfo and two optional arguments, the first | being the start address and the second is the length. These define | the amount of data to be read from the archive. | | Search(self, text, wholewords=0, titleonly=0) | Performs full-text search on the archive. | The first parameter is the word to look for, the second | indicates if the search should be for whole words only, and | the fourth parameter indicates if the search should be | restricted to page titles. | This method will return a tuple, the first item | indicating if the search results were partial, and the second | item being a dictionary containing the results. | | __init__(self) | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | binaryindex = None | | encoding = None | | file = None | | filename = '' | | home = '/' | | index = None | | lcid = None | | title = '' | | topics = None DATA charset_table = {0: 'iso8859_1', 1: None, 2: None, 77: None, 128: 'cp9... locale_table = {1025: ('iso8859_6', 'Arabic_Saudi_Arabia', 'Arabic'), ... >>>