Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Added a ReST formatted docstring in __init__.py
  • Loading branch information
david-hughes committed Mar 13, 2018
1 parent 5ac3eab commit f91a644
Showing 1 changed file with 31 additions and 10 deletions.
41 changes: 31 additions & 10 deletions wx/lib/pubsub/__init__.py
@@ -1,17 +1,38 @@
"""
Pubsub package initialization.
# Name: __init__.py
# Package: wx.lib.pubsub
#
# Purpose: Pubsub package initialization
#
# Author: Oliver Schoenborn
# Copyright: Oliver Schoenborn
# Licence: BSD, see LICENSE_BSD_Simple.txt for details

# History: Created 2000/2006
#
# Tags: phoenix-port, documented
#
#----------------------------------------------------------------------------

:copyright: Copyright since 2006 by Oliver Schoenborn, all rights reserved.
:license: BSD, see LICENSE_BSD_Simple.txt for details.
"""
**pubsub** is a Python package which provides a publish - subscribe API to facilitate event-based
programming and decoupling of components of an application via the Observer pattern.
Using the Observer pattern in your application can dramatically simplify its design and improve
testability. Basically you just have some part(s) of your program subscribe to a particular topic
and have some other part(s) of your program publish messages with that topic. All the plumbing
is taken care of by pubsub.
# Import pubsub (Version 4.0.0) from site-packages/pubsub
It originated in wxPython around the year 2000 but has been standalone, available on PyPI, since
2006 under the name **Pypubsub** although the code has also been kept in wxPython as wx.lib.pubsub.
# Import all items from the pubsub package so they appear
# in the wx.lib.pubsub package namespace. This to maintain
# its appearance as wx.lib.pubsub where it was originally
# created but subsequently published as a stand-alone package
# that is currently sourced from https://github.com/schollii/pypubsub
To remove the duplication of the pubsub code in both Pypubsub and wx.lib but to maintain backward
compatibility, wxPython 4 simply imports the standalone package into wx.lib.pubsub. Installing
or updating wxPython should now also install Pypubsub but it can be explicitly installed using
``pip install Pypubsub``
The documentation for pubsub is available at https://pypubsub.readthedocs.io/en/v4.0.0/ and the
source code is hosted at https://github.com/schollii/pypubsub
"""

try:
from pubsub import *
Expand Down

0 comments on commit f91a644

Please sign in to comment.