Table Of Contents

Previous topic

Core Classes

Next topic

Packaging with py2exe and cxFreeze

This Page


This page is intended mostly for developers.


List of things I would like to add to pubsub:

  • completed implementation of support for pubsub over UDP sockets, which would allow two pubsub-apps to publish and subscribe to messages of other applications (pseudo-code already in src/contrib)
  • complete implementation of multi-threading helper class, no change required to pubsub, rather just utility class to help user (pseudo-code already in src/contrib)
  • figure out a good way to prevent wrapped listener subscriptions from being DOA (pubsub only keeps weak reference to listener, so if listener subscribe like pub.subscribe( wrapper(yourListener) ) then listener will be unsubscribed as soon as subscribe returns; you need refListener = wrapper(yourListener); pub.subscribe(refListener))
  • finish the src/contrib/monitor implementation to monitor pubsub messages, or some way of monitoring message sending


Contributions are welcome! There are many ways you could contribute:

  • bug fixes
  • new features
  • test results on different platforms
  • documentation
  • screencasts! (of applications using pubsub with output when user clicks)
  • example topic trees (using pubsubutils.printTopicTree() in latest version, or print Publisher in versions 1)
  • other improvements
  • money!

Please contact me via email (schoenborno, at or by posting on the forums (links in the Support section).

System Requirements

In addition to the System Requirements, the following are required:

  • To run unit tests:

    • nose >= 0.10
    • coverage >= 3.1b1
  • To generate these docs:

    • sphinx >= 0.6.3; note that sphinx must be patched as per post on sphinx-dev:

      --- C:/Python24/Lib/site-packages/Sphinx-0.6.5-py2.4.egg_orig/sphinx/	Thu Mar 18 09:59:23 2010
      +++ C:/Python24/Lib/site-packages/Sphinx-0.6.5-py2.4.egg/sphinx/	Thu Mar 18 09:57:40 2010
      @@ -933,12 +933,12 @@
                   node['refuri'] = node['anchorname'] or '#'
               return toc
      -    def get_toctree_for(self, docname, builder, collapse):
      +    def get_toctree_for(self, docname, builder, **tmplKw):
               """Return the global TOC nodetree."""
               doctree = self.get_doctree(self.config.master_doc)
               for toctreenode in doctree.traverse(addnodes.toctree):
                   result = self.resolve_toctree(docname, builder, toctreenode,
      -                                          prune=True, collapse=collapse)
      +                                          prune=True, **tmplKw)
                   if result is not None:
                       return result
      --- C:/Python24/Lib/site-packages/Sphinx-0.6.5-py2.4.egg_orig/sphinx/builders/	Thu Mar 18 09:59:25 2010
      +++ C:/Python24/Lib/site-packages/Sphinx-0.6.5-py2.4.egg/sphinx/builders/	Thu Mar 18 09:55:40 2010
      @@ -623,9 +623,9 @@
               if self.indexer is not None and title:
                   self.indexer.feed(pagename, title, doctree)
      -    def _get_local_toctree(self, docname, collapse=True):
      +    def _get_local_toctree(self, docname, **tmplKw):
               return self.render_partial(self.env.get_toctree_for(
      -            docname, self, collapse))['fragment']
      +            docname, self, **tmplKw))['fragment']
           def get_outfilename(self, pagename):
               return path.join(self.outdir, os_path(pagename) + self.out_suffix)

Scripts Available

The following is likely to be useful to pubsub developers and contributors only.


The package currently gets tested on Windows XP only. The tests can be run automatically by running runtests.bat from the tests folder of a source distribution.

If anyone is able to run the test suite on other platforms, please let me know of the results. A Linux person will have no trouble running the equivalent batch commands on Linux.

The documentation can be generated on Windows by running gendocs.bat from the docs folder of a source distribution (but see the note about Sphinx patch in next section). For Linux, again you should be able to just copy the commands form the .bat file to a shell window.
A small performance test is available in the tests folder. On Windows, run it via runperf.bat. On Linux, you’ll have to convert the file to a bash script (the .bat file is very simple, no branching etc), or run the commands manually.


PyPubSub requires setuptools to be packaged for distribution.

For packaging py2exe or cx_Freeze, there is a separate section:

For packaging into .deb package, there is a separate section: