To my understanding (and I'm no pubsub expert...I'm just trying to get it to work like you are), if you specify an api (setuparg1 or setupkwargs), it uses version 3 api. If not, it defaults to version 1. It does this by checking for the existence of the file "autosetuppubsubv1.py", which *does* exist in wx.lib.pubsub. So it sets itself up with version 1 api.
You need to be using "setupv1" if you explicitly want version 1 api, which is equivalent to not importing *neither* of setuparg1 or setupkwargs. So to summarize, and I hope I'm right... :) from wx.lib.pubsub import setupv1 from wx.lib.pubsub import Publisher--> version 1 api. from wx.lib.pubsub import setuparg1 from wx.lib.pubsub import pub as Publisher --> version 3 api. from wx.lib.pubsub import setupkwargs from wx.lib.pubsub import pub as Publisher --> version 3 api. from wx.lib.pubsub import Publisher --> version 1 api *I think* that in the v1 cases, the imports above are correct, and return a Publisher singleton, which has to be used like Publisher().subscribe(...). In the v3 cases, what ends up being called "Publisher" there is a module, so Publisher.subscribe(...) is appropriate. On Tue, Dec 13, 2011 at 4:38 PM, Sebastian Hilbert < [email protected]> wrote: > On Tuesday, December 13, 2011 09:10:51 PM Sebastian Hilbert wrote: > Hi all, > > > This is driving me crazy. Could someone please explain this to me: > > > C:\Temp\pubsub>c:\Python27\python.exe > Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] > on > win > 32 > Type "help", "copyright", "credits" or "license" for more information. > >>> from wx.lib.pubsub import pub > >>> print pub.VERSION_STR > 1.1.200904.r159 > >>> ^Z > > C:\Temp\pubsub>c:\Python27\python.exe > Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] > on > win > 32 > Type "help", "copyright", "credits" or "license" for more information. > >>> from wx.lib.pubsub import setuparg1 > >>> from wx.lib.pubsub import pub > >>> print pub.VERSION_STR > 3.1.1b1.201005.r243 > >>> > > Why is it that the default seems to be api v1 while when explicitely > setting > api v1 with setuparg1 it reports being api v3 ? > > Sebastian > > -- > You received this message because you are subscribed to the Google Groups > "PyInstaller" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/pyinstaller?hl=en. > > -- Daniel Hyams [email protected] -- You received this message because you are subscribed to the Google Groups "PyInstaller" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/pyinstaller?hl=en.
