phoenix_title wx.lib.pubsub.core.topicdefnprovider

copyright

Copyright since 2006 by Oliver Schoenborn, all rights reserved.

license

BSD, see LICENSE_BSD_Simple.txt for details.

function_summary Functions Summary

exportTopicTreeSpec

Using TopicTreeSpecPrinter, exports the topic tree rooted at rootTopic to a


class_summary Classes Summary

ITopicDefnDeserializer

Interface class for all topic definition de-serializers that can be

TopicDefn

Encapsulate date for a topic definition. Used by

ITopicDefnProvider

All topic definition providers added via pub.addTopicDefnProvider()

TopicDefnDeserialClass

Convert a nested class tree as a topic definition tree. Format: the class

TopicDefnDeserialModule

Deserialize a module containing Python source code defining a topic tree.

TopicDefnDeserialString

Deserialize a string containing Python source code defining a topic tree.

TopicDefnProvider

Default implementation of the ITopicDefnProvider API. This

TopicTreeSpecPrinter

Helper class to print the topic tree using the Python class


Functions



exportTopicTreeSpec(moduleName = None, rootTopic=None, bak='bak', moduleDoc=None)

Using TopicTreeSpecPrinter, exports the topic tree rooted at rootTopic to a Python module (.py) file. This module will define module-level classes representing root topics, nested classes for subtopics etc. Returns a string representing the contents of the file. Parameters:

  • If moduleName is given, the topic tree is written to moduleName.py in os.getcwd(). By default, it is first backed up, it it already exists, using bak as the filename extension. If bak is None, existing module file gets overwritten.

  • If rootTopic is specified, the export only traverses tree from corresponding topic. Otherwise, complete tree, using pub.getDefaultTopicTreeRoot() as starting point.

  • The moduleDoc is the doc string for the module ie topic tree.