Copyright since 2006 by Oliver Schoenborn, all rights reserved.
BSD, see LICENSE_BSD_Simple.txt for details.
Using TopicTreeSpecPrinter, exports the topic tree rooted at rootTopic to a |
Interface class for all topic definition de-serializers that can be |
|
Encapsulate date for a topic definition. Used by |
|
All topic definition providers added via pub.addTopicDefnProvider() |
|
Convert a nested class tree as a topic definition tree. Format: the class |
|
Deserialize a module containing Python source code defining a topic tree. |
|
Deserialize a string containing Python source code defining a topic tree. |
|
Default implementation of the ITopicDefnProvider API. This |
|
Helper class to print the topic tree using the Python class |
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.