.. wxPython Phoenix documentation This file was generated by Phoenix's sphinx generator and associated tools, do not edit by hand. Copyright: (c) 2011-2020 by Total Control Software License: wxWindows License .. include:: headings.inc .. module:: wx.lib.pubsub.core.topicutils .. currentmodule:: wx.lib.pubsub.core.topicutils .. highlight:: python .. _wx.lib.pubsub.core.topicutils: ========================================================================================================================================== |phoenix_title| **wx.lib.pubsub.core.topicutils** ========================================================================================================================================== Various utilities used by topic-related modules. :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.core.topicutils.smartDedent` Dedent paragraph using textwrap.dedent(), but properly dedents :func:`~wx.lib.pubsub.core.topicutils.stringize` If topicName is a string, just return it :func:`~wx.lib.pubsub.core.topicutils.tupleize` If topicName is a tuple of strings, just return it as is. Otherwise, :func:`~wx.lib.pubsub.core.topicutils.validateName` Raise TopicNameError if nameTuple not valid as topic name. ================================================================================ ================================================================================ | |class_summary| Classes Summary =============================== ================================================================================ ================================================================================ `~wx.lib.pubsub.core.topicutils.WeakNone` Pretend to be a weak reference to nothing. Used by ArgsInfos to ================================================================================ ================================================================================ | .. toctree:: :maxdepth: 1 :hidden: wx.lib.pubsub.core.topicutils.WeakNone Functions ------------ .. function:: smartDedent(paragraph) Dedent paragraph using textwrap.dedent(), but properly dedents even if the first line of paragraph does not contain blanks. This handles the case where a user types a documentation string as '''A long string spanning several lines.''' .. function:: stringize(topicName) If topicName is a string, just return it as is. If it is a topic definition object (ie an object that has 'msgDataSpec' as data member), return the dotted name of corresponding topic. Otherwise, assume topicName is a tuple and convert it to to a dotted name i.e. ('a','b','c') => 'a.b.c'. Empty name is not allowed (ValueError). The reverse operation is tupleize(topicName). .. function:: tupleize(topicName) If topicName is a tuple of strings, just return it as is. Otherwise, convert it to tuple, assuming dotted notation used for topicName. I.e. 'a.b.c' => ('a','b','c'). Empty topicName is not allowed (ValueError). The reverse operation is stringize(topicNameTuple). .. function:: validateName(topicName) Raise TopicNameError if nameTuple not valid as topic name.