Next: , Previous: Reloading a python file in GPS, Up: Python FAQ


16.8.7.7 Printing the GPS Python documentation

The python extension provided by GPS is fully documentation in this manual and a separate manual accessible through the Help menu in GPS.

However, this documentation is provided in HTML, and might not be the best suitable for printing, if you wish to do so.

The following paragraph explains how you can generate your own documentation for any python module, including GPS, and print the result.

     import pydoc
     pydoc.writedoc (GPS)

In the last comamnd, GPS is the name of the module that you want to print the documentation for.

These commands generate a .html file in the current directory.

Alternatively, you can generate a simple text file with

     e=file("./python_doc", "w")
     e.write (pydoc.text.document (GPS))
     e.flush()

This text file includes bold characters by default. Such bold characters are correctly interpreted by tools such as a2ps which can be used to convert the text file into a postscript document.