.. wxPython Phoenix documentation

   This file was generated by Phoenix's sphinx generator and associated
   tools, do not edit by hand.

   Copyright: (c) 2011-2017 by Total Control Software
   License:   wxWindows License

.. include:: headings.inc

.. module:: wx.lib.pubsub.utils.topictreeprinter

.. currentmodule:: wx.lib.pubsub.utils.topictreeprinter

.. highlight:: python



.. _wx.lib.pubsub.utils.topictreeprinter:

==========================================================================================================================================
|phoenix_title|  **wx.lib.pubsub.utils.topictreeprinter**
==========================================================================================================================================

Output various aspects of topic tree to string or file.

:copyright: Copyright since 2006 by Oliver Schoenborn, all rights reserved.
:license: BSD, see LICENSE_BSD_Simple.txt for details.


|function_summary| Functions Summary
====================================

================================================================================ ================================================================================
:func:`~wx.lib.pubsub.utils.topictreeprinter.printTreeDocs`                      Print out the topic tree to a file (or file-like object like a
================================================================================ ================================================================================


|


|class_summary| Classes Summary
===============================

================================================================================ ================================================================================
:ref:`~wx.lib.pubsub.utils.topictreeprinter.TopicTreePrinter`                    Example topic tree visitor that prints a prettified representation
================================================================================ ================================================================================


|


.. toctree::
   :maxdepth: 1
   :hidden:

   wx.lib.pubsub.utils.topictreeprinter.TopicTreePrinter





Functions
------------

.. function:: printTreeDocs(rootTopic=None, topicMgr=None, \*\*kwargs)

   Print out the topic tree to a file (or file-like object like a
   StringIO), starting at rootTopic. If root topic should be root of
   whole tree, get it from pub.getDefaultTopicTreeRoot().
   The treeVisitor is an instance of pub.TopicTreeTraverser.
   
   Printing the tree docs would normally involve this::
   
       from pubsub import pub
       from pubsub.utils.topictreeprinter import TopicTreePrinter
       traverser = pub.TopicTreeTraverser( TopicTreePrinter(**kwargs) )
       traverser.traverse( pub.getDefaultTopicTreeRoot() )
   
   With printTreeDocs, it looks like this::
   
       from pubsub import pub
       from pubsub.utils import printTreeDocs
       printTreeDocs()
   
   The kwargs are the same as for TopicTreePrinter constructor:
   extra(None), width(70), indentStep(4), bulletTopic, bulletTopicItem,
   bulletTopicArg, fileObj(stdout). If fileObj not given, stdout is used.


