[wxPython-users] Sending/Using Data with wx.lib.pubsub
Rich Shepard
rshepard at appl-ecosys.com
Mon Oct 1 06:09:24 PDT 2007
On Mon, 1 Oct 2007, chris botos wrote:
> Yes, it is sent.
Chris,
I assumed this to be the case, but the more important question is the one
about how it's used by the receiver ...
> The subscribed function should look something like this:
>
> def SubscribedFunction(self, message):
> newvar = message.data
> etc.
... which you've answered for me.
> I had to do some experimenting initially to figure this out. Note that
> the data can be any python object. If I recall correctly, message.topic
> will be the topic from the sendMessage call
> (yourclassobject.appData.projVars from your example above.)
I'm not sufficiently experienced with python to have figured this out
myself. The brief docs don't address it at all.
Thank you very much,
Rich
--
Richard B. Shepard, Ph.D. | The Environmental Permitting
Applied Ecosystem Services, Inc. | Accelerators(TM)
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863
More information about the wxpython-users
mailing list